Inviting a user to a room: "unknown server error" reported when the format of the handle is incorrect
Steps to reproduce
- In a Matrix room, click "Invite to this room"
- In the username input field, write a badly formatted account, such as
@[email protected](the correct form should be@username:matrix.org) - Click "Invite"
Outcome
What did you expect?
The interface should make it clear to me that the Matrix handle is syntactically incorrect.
What happened instead?
I am shown a "Unknown server error" message instead
Operating system
Debian
Browser information
Firefox 115.6.0esr
URL for webapp
https://app.element.io
Application version
Element version: 1.11.55, Crypto version: Olm 3.2.15
Homeserver
matrix.org
Will you send logs?
Yes
Same issue last three days with Element on a matrix.org room
You're trying to invite something between a Matrix ID & an email address.
Emails look like localpart@server
Matrix IDs look like @localpart:server
Your server is returning an Internal Server Error for your action
2024-01-24T11:34:42.576Z E MatrixError: [500] Internal server error (https://matrix-client.matrix.org/_matrix/client/v3/rooms/!wfeLebAgUQfWdzDfkT%3Amatrix.org/invite)
s@https://app.element.io/bundles/6f661f6f3f18a5415d5a/bundle.js:2:839837
a@https://app.element.io/bundles/6f661f6f3f18a5415d5a/bundle.js:2:839982
p@https://app.element.io/bundles/6f661f6f3f18a5415d5a/bundle.js:2:841149
requestOtherUrl@https://app.element.io/bundles/6f661f6f3f18a5415d5a/bundle.js:2:845462
@t3chguy we do understand that. By opening this issue, I am suggesting that the error messaging should be improved. When a user inputs invalid data in a tool, it should ideally not cause an "internal error", but instead output an error message that explains to the user that their input is invalid. Does that make sense to you?
For my case, I'm using a legitimate email address ([email protected]), which the messaging says is valid. Let me know if you would like specifics.
Agreed that the messaging should give users an idea of what they are doing wrong.