forked from mystiq/hydrogen-web
Catch any error from queryLogin
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
fc169af10f
commit
c9319c7c38
1 changed files with 8 additions and 1 deletions
|
@ -44,7 +44,14 @@ export class CompleteSSOLoginViewModel extends ViewModel {
|
|||
return;
|
||||
}
|
||||
const homeserver = await this.platform.settingsStorage.getString("sso_ongoing_login_homeserver");
|
||||
const loginOptions = await this._sessionContainer.queryLogin(homeserver);
|
||||
let loginOptions;
|
||||
try {
|
||||
loginOptions = await this._sessionContainer.queryLogin(homeserver);
|
||||
}
|
||||
catch (err) {
|
||||
this._showError(err.message);
|
||||
return;
|
||||
}
|
||||
if (!loginOptions.token) {
|
||||
const path = this.navigation.pathFrom([this.navigation.segment("session")]);
|
||||
this.navigation.applyPath(path);
|
||||
|
|
Loading…
Reference in a new issue