Fail more softly on homeserver liveliness errors

This performs liveliness checks on the auth pages to try and show a friendlier error. Earlier checks in the app startup are expected to not block the app from loading on such failures.

See https://github.com/vector-im/riot-web/issues/9828
This commit is contained in:
Travis Ralston 2019-06-04 23:41:59 -06:00
parent b412103f21
commit e2fdeec71a
8 changed files with 257 additions and 33 deletions

View file

@ -108,6 +108,8 @@ export default class ModularServerConfig extends React.PureComponent {
busy: false,
errorText: message,
});
return null;
}
}
@ -132,7 +134,8 @@ export default class ModularServerConfig extends React.PureComponent {
onSubmit = async (ev) => {
ev.preventDefault();
ev.stopPropagation();
await this.validateServer();
const result = await this.validateServer();
if (!result) return; // Do not continue.
if (this.props.onAfterSubmit) {
this.props.onAfterSubmit();