You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec typically specifies that an endpoint returns 200 with a success payload, or 4xx with an error payload. In many cases the status codes listed for HTTP errors are few, and there may be more appropriate ones to choose from. Additionally, I think endpoints almost never specify which matrix error code (e.g. M_UNKNOWN) to return.
It's straightforward enough to change the text of the spec to allow new status codes, but it's not clear if doing so is a backward incompatible change that requires MSCs etc.
it is never clear to me if a list of status codes in the spec is normative and/or exhaustive. I think in practice not, because servers can fall over and return 500 at any time.
However, with the current ambiguity in the specification on whether the HTTP status codes are normative or non-normative, there's a good chance that some clients are relying on these sort of errors having a 400 status code either way, M_UNKNOWN or not. Which means that this seems like it would need a specification change to resolve, unless there's some sort of existing guidance on this that I'm not aware of.
The text was updated successfully, but these errors were encountered:
DMRobertson
added
the
clarification
An area where the expected behaviour is understood, but the spec could do with being more explicit
label
Jun 28, 2022
For reference, the gematik spec (which builds upon the Matrix spec) treats HTTP status codes as normative and currently assumes them to be normative in the Matrix spec, too. I think they should not be exhaustive though because an implementation should be allowed to define custom status codes for cases not covered by the spec.
Link to problem area: every API page
Issue
The spec typically specifies that an endpoint returns 200 with a success payload, or 4xx with an error payload. In many cases the status codes listed for HTTP errors are few, and there may be more appropriate ones to choose from. Additionally, I think endpoints almost never specify which matrix error code (e.g.
M_UNKNOWN
) to return.It's straightforward enough to change the text of the spec to allow new status codes, but it's not clear if doing so is a backward incompatible change that requires MSCs etc.
Related:
502 Bad Gateway
and504 Gateway Timeout
HTTP status code #1034/event/<event ID>
when that event is not available #1105The text was updated successfully, but these errors were encountered: