mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 10:29:06 +02:00
Add error handling to login method
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -186,10 +186,12 @@ class ArcaneAuthenticationService extends ArcaneService {
|
|||||||
password: password,
|
password: password,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (result.isSuccess) {
|
if (result.isFailure) {
|
||||||
|
throw Exception(result.error);
|
||||||
|
}
|
||||||
|
|
||||||
setAuthenticated();
|
setAuthenticated();
|
||||||
if (onLoggedIn != null) await onLoggedIn();
|
if (onLoggedIn != null) await onLoggedIn();
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user