Commit 66e56ded authored by Jose Blaya's avatar Jose Blaya

Update error message in Login errors

parent b0538585
......@@ -215,7 +215,7 @@ class DefaultAccountProvider: AccountProvider, ConfigurationAccess, DatabaseAcce
webServices.token(credentials: request.credentials) { (token, error) in
guard let token = token else {
callback?(nil, error)
callback?(nil, ClientError.unauthorized)
return
}
......@@ -224,7 +224,9 @@ class DefaultAccountProvider: AccountProvider, ConfigurationAccess, DatabaseAcce
self.webServices.info(token: token) { (accountInfo, error) in
guard let accountInfo = accountInfo else {
callback?(nil, error)
self.webServices.logout(nil)
self.cleanDatabase()
callback?(nil, ClientError.unauthorized)
return
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment