matrix-org / matrix-org/matrix-spec
/_matrix/client/v1/media/preview_url should clarify what status codes / errors may be returned
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
**Link to problem area**: https://spec.matrix.org/v1.17/client-server-api/#get_matrixclientv1mediapreview_url
**Issue**
Currently it only documents 200, and 429. However, Synapse returns a [500 error](https://github.com/element-hq/synapse/blob/6eef477d546b8ac3a2a800d1f2840d44eef6b40e/synapse/media/url_previewer.py#L518-L523) in pretty much all cases except DNS resolution, which is a 502.
Realistically I'd expect a 404 error if the homeserver cannot resolve a URL, with perhaps more specific error codes depending on the type of failure.
Contributor guide
Research direction
Read the Matrix Client-Server API's preview_url section and compare its documented responses with the Synapse behavior referenced in synapse/media/url_previewer.py at lines 518-523. Determine which status codes and error cases are appropriate to document, then update the endpoint specification so its documented responses match the agreed behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100