Simplify new error handling

This commit is contained in:
Zed
2022-01-16 18:28:40 +01:00
parent 3d91ae0256
commit fff04de24b
4 changed files with 12 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ proc getBanner(user: User): string =
proc parseUser*(json: string): Profile =
handleErrors:
case error
case error.code
of suspended: return Profile(suspended: true)
of userNotFound: return
else: echo "[error - parseUser]: ", error