element-hq / element-hq/element-web
Better error handling for room alias addresses
- 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:

### TODO
Requires a list of all the errors returned by `state/m.room.canonical_alias/` endpoint and a way to translate them.
Contributor guide
Assessment
This issue has not been assessed yet.