Add standard error responses (MSC3743). (#1347)

This commit is contained in:
Patrick Cloke 2022-11-22 10:51:29 -05:00 committed by GitHub
parent dfc8a2e184
commit eeb43043ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 41 additions and 3 deletions

View file

@ -107,6 +107,11 @@ No resource was found for this request.
Too many requests have been sent in a short period of time. Wait a while
then try again.
`M_UNRECOGNIZED`
The server did not understand the request. This is expected to be returned with
a 404 HTTP status code if the endpoint is not implemented or a 405 HTTP status
code if the endpoint is implemented, but the incorrect HTTP method is used.
`M_UNKNOWN`
An unknown error has occurred.
@ -116,9 +121,6 @@ The following error codes are specific to certain endpoints.
<!-- TODO: move them to the endpoints that return them -->
`M_UNRECOGNIZED`
The server did not understand the request.
`M_UNAUTHORIZED`
The request was not correctly authorized. Usually due to login failures.