matrix-org / matrix-org/matrix-spec

Add `404` as valid response for `/thumbnail` and `/download` when `mediaId` does not exist

Open
#1,122 2 comments 0 reactions 0 assignees View on GitHub
A-Client-Server spec-omission
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

`400` makes a lot of sense for all of the scenarios where the media repository can't provide a thumbnail for whatever reason when the media exists.

But `404` probably makes more sense when `mediaId` isn't valid and doesn't exist.

## Current spec

https://spec.matrix.org/v1.1/client-server-api/#get_matrixmediav3thumbnailservernamemediaid

**Responses**
Status | Description
--- | ---
200 | A thumbnail of the requested content.
400 | The request does not make sense to the server, or the server cannot thumbnail the content. For example, the client requested non-integer dimensions or asked for negatively-sized images.
413 | The local content is too large for the server to thumbnail.
429 | This request was rate-limited.
502 | The remote content is too large for the server to thumbnail.

Contributor guide

Open the contributing guide

Research direction

Start with the linked Matrix client-server API specification section and locate the response tables for /thumbnail and /download. Add 404 for the case where mediaId does not exist, while preserving the existing responses for other failures. Done means both endpoint specifications clearly list 404 with that condition.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.