mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Merge pull request #3102 from matrix-org/dbkr/nonfatal_errors_are_not_fatal
Allow changing servers on nonfatal errors
This commit is contained in:
commit
2a7301fa8f
1 changed files with 18 additions and 9 deletions
|
@ -101,6 +101,14 @@ export default class ServerConfig extends React.PureComponent {
|
|||
return result;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
const stateForError = AutoDiscoveryUtils.authComponentStateForError(e);
|
||||
if (!stateForError.isFatalError) {
|
||||
// carry on anyway
|
||||
const result = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
|
||||
this.props.onServerConfigChange(result);
|
||||
return result;
|
||||
} else {
|
||||
let message = _t("Unable to validate homeserver/identity server");
|
||||
if (e.translatedMessage) {
|
||||
message = e.translatedMessage;
|
||||
|
@ -113,6 +121,7 @@ export default class ServerConfig extends React.PureComponent {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onHomeserverBlur = (ev) => {
|
||||
this._hsTimeoutId = this._waitThenInvoke(this._hsTimeoutId, () => {
|
||||
|
|
Loading…
Reference in a new issue