Allow changing servers on nonfatal errors#3102
Conversation
turt2live
left a comment
There was a problem hiding this comment.
this works, however so does:
try {
await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl);
} catch (e) {
if (AutoDiscoveryUtils.isLivelinessError(e)) {
// Continue anyways logic
}
// else E_BROKEN
}
lgtm either way. Would be nice to have 1 less blank line on line 121 though.
|
I thought we needed the return value from |
|
we do, but we can always call it again with |
|
In this case we need to do so immediately though because we need to pass it to |
|
oh - it's not equivalent because nonfatal error !== liveness check fail (ie. we still want to fail if the HS isn't reachable) |
|
ah, yes, it would be... so just a try/catch around a |
|
hmm... if non-fatal is != to liveliness then the code you have here is fine, because |
|
ok yeah, I think this is right then, ie. it will let you continue with the change if the IS server is down but not if the HS is down. |
@turt2live: hopefully this is a sensible way to do this
Fixes element-hq/element-web#10016