element-meta icon indicating copy to clipboard operation
element-meta copied to clipboard

Inviting a user to a room: "unknown server error" reported when the format of the handle is incorrect

Open wetneb opened this issue 1 year ago • 4 comments

Steps to reproduce

  1. In a Matrix room, click "Invite to this room"
  2. In the username input field, write a badly formatted account, such as @[email protected] (the correct form should be @username:matrix.org)
  3. 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 image

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

wetneb avatar Jan 24 '24 11:01 wetneb

Same issue last three days with Element on a matrix.org room

sshanky avatar Mar 04 '25 21:03 sshanky

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 avatar Mar 04 '25 21:03 t3chguy

@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?

wetneb avatar Mar 04 '25 22:03 wetneb

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.

sshanky avatar Mar 05 '25 01:03 sshanky