Suppress CORS errors in the 'failed to join room' dialog
This isn't pretty, but it does address https://github.com/vector-im/riot-web/issues/7526 Tested with Chrome and Firefox to ensure the message is stable enough to parse.
This commit is contained in:
parent
0c6e98548e
commit
2b027b716f
2 changed files with 4 additions and 0 deletions
|
@ -224,6 +224,9 @@ class RoomViewStore extends Store {
|
|||
err: err,
|
||||
});
|
||||
let msg = err.message ? err.message : JSON.stringify(err);
|
||||
if (msg && msg.startsWith("CORS request rejected")) {
|
||||
msg = _t("There was an error joining the room");
|
||||
}
|
||||
if (err.errcode === 'M_INCOMPATIBLE_ROOM_VERSION') {
|
||||
msg = <div>
|
||||
{_t("Sorry, your homeserver is too old to participate in this room.")}<br />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue