From 6cd7038d010f7c9369d5b3ca10c6d2089b03397c Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 6 Nov 2024 12:28:47 +0100 Subject: [PATCH] Clarify that the async upload endpoint will return 404 in some cases (#1983) --- .../newsfragments/1983.clarification | 1 + data/api/client-server/content-repo.yaml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 changelogs/client_server/newsfragments/1983.clarification diff --git a/changelogs/client_server/newsfragments/1983.clarification b/changelogs/client_server/newsfragments/1983.clarification new file mode 100644 index 00000000..764372f8 --- /dev/null +++ b/changelogs/client_server/newsfragments/1983.clarification @@ -0,0 +1 @@ +Clarify that the async upload endpoint will return 404 in some cases. diff --git a/data/api/client-server/content-repo.yaml b/data/api/client-server/content-repo.yaml index b6feba61..c64a914b 100644 --- a/data/api/client-server/content-repo.yaml +++ b/data/api/client-server/content-repo.yaml @@ -126,6 +126,25 @@ paths: "errcode": "M_FORBIDDEN", "error": "Cannot upload this content" } + "404": + description: |- + The user has provided an invalid MXC ID. Some reasons for this error include: + + - The MXC ID was not created with [POST /_matrix/media/v1/create](/client-server-api/#post_matrixmediav1create). + - The MXC ID has expired. + + A [standard error response](/client-server-api/#standard-error-response) + will be returned with the `errcode` `M_NOT_FOUND`. + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: { + "errcode": "M_NOT_FOUND", + "error": "Unknown media ID" + } "409": description: |- The endpoint was called with a media ID that already has content. A