Skip to content

Conversation

@beastafk
Copy link
Contributor

@beastafk beastafk commented Sep 4, 2024

Currently, Synapse-Admin shows generic errors when an error is returned from Synapse API. But Synapse Admin API uses error format from the Matrix specification.

Please add a global error handler, that will attempt to parse the Matrix error from the response, and if failed, just return the whole response as an error message.

The format should be the following:

<errcode> (<http status code>): <error>, example: M_MISSING_PARAM (400): parameter is missing

Example: invalid credentials

  1. Attempt to login with invalid login/password
  2. See error Authentication failed, please retry
  3. Actual error returned from API: {"errcode":"M_FORBIDDEN","error":"Invalid username or password"}

It should show M_FORBIDDEN (403): Invalid username or password

@beastafk
Copy link
Contributor Author

beastafk commented Sep 4, 2024

Fixes #10

@beastafk beastafk force-pushed the display-actual-synapse-errors branch from 0ddc6dc to d74ec47 Compare September 5, 2024 15:56
@aine-etke aine-etke merged commit 390aab5 into main Sep 5, 2024
@aine-etke aine-etke deleted the display-actual-synapse-errors branch October 25, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants