matrix-org / matrix-org/matrix-spec
Is the `error` field in standard error responses required?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
In the CS and IS APIs, the [standard error response](https://spec.matrix.org/v1.16/client-server-api/#standard-error-response) definition has this sentence:
> Some `errcode`s define additional keys which should be present in the error response object, but the keys `error` and `errcode` MUST always be present.
But then in the [OpenAPI definition of errors](https://github.com/matrix-org/matrix-spec/blob/974b0b721e7c54bbff320e4dfd05e1f041abe68d/data/api/client-server/definitions/errors/error.yaml), the field is not marked as required.
Furthermore, it looks like the AS API never has this field in example error responses, but is the error response format supposed to be identical between specs anyway?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Standard Error Response text in the Client-Server API, then compare it with data/api/client-server/definitions/errors/error.yaml. Review the AS API error examples to determine whether the same format is intended. Done means the requirement, OpenAPI definition, and relevant examples consistently describe whether error is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100