mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Catch any error from queryLogin
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
fc169af10f
commit
c9319c7c38
@ -44,7 +44,14 @@ export class CompleteSSOLoginViewModel extends ViewModel {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const homeserver = await this.platform.settingsStorage.getString("sso_ongoing_login_homeserver");
|
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) {
|
if (!loginOptions.token) {
|
||||||
const path = this.navigation.pathFrom([this.navigation.segment("session")]);
|
const path = this.navigation.pathFrom([this.navigation.segment("session")]);
|
||||||
this.navigation.applyPath(path);
|
this.navigation.applyPath(path);
|
||||||
|
Loading…
Reference in New Issue
Block a user