Simplify new error handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user