Add error handling to login method

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2024-09-17 13:01:36 +02:00
parent 32c36413d6
commit 4e22c08ed9
@@ -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;
} }