element-hq / element-hq/element-web

Better error handling for room alias addresses

Open
#19,730 4 comments 0 reactions 0 assignees View on GitHub
A-Aliases A-Room-Settings Hacktoberfest Help Wanted O-Frequent S-Major T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

Followup to https://github.com/vector-im/element-web/issues/19609 as currently there's a very generic modal/popup if there's any kind of an error and that's very unhelpful.
We should show a humanized (and definitely not developer-humanized, like it is being returned from backend) version of the errors in the modal windows instead, so that the user knows what really happened there and how to fix it.

#### What would you like to do?
1. Go to room settings (in the left panel, ⋯ -> Settings)
2. Under Room Addresses -> Published Addresses, add and address that looks like "#someaddress"
3. Add
4. Get pop-up with "Error updating main address"
5. Close dialog
6. See bad alias shown in the list
7. Under "main address" dropdown, see the bad alias listed
8. Select the bad alias under "main address" to get another error dialog

### Outcome

#### What did you expect?
Modal window with proper description of the error appears, that clearly describes what the error is.

#### What happened instead?
A very generic error window appears, that doesn't tell you what kind of an error happened or how to fix it.
See attached screenshot:
![CleanShot 2021-11-12 at 15 23 15](https://user-images.githubusercontent.com/3636685/141482048-e6fdb78c-c50f-4f1b-81e6-8b22718076bc.png)

### TODO
Requires a list of all the errors returned by `state/m.room.canonical_alias/` endpoint and a way to translate them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.