From f58ea57ca99943c7e54dce96433fc7bec83f48f4 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 1 Jul 2022 00:36:55 +0100 Subject: [PATCH] Also return 400 if you give a bogus room ID --- data/api/client-server/account-data.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/data/api/client-server/account-data.yaml b/data/api/client-server/account-data.yaml index ff276a95..97369b29 100644 --- a/data/api/client-server/account-data.yaml +++ b/data/api/client-server/account-data.yaml @@ -214,7 +214,8 @@ paths: type: object 400: description: |- - The request body is not a JSON object. + The request body is not a JSON object, or the given `roomID` is not a valid + room ID. examples: application/json: { "errcode": "M_BAD_JSON", @@ -286,6 +287,14 @@ paths: type: object example: { "custom_account_data_key": "custom_config_value"} + 400: + description: |- + The given `roomID` is not a valid room ID. + examples: + application/json: { + "errcode": "M_INVALID_PARAM", + "error": "@notaroomid:example.org is not a valid room ID." + } 403: description: |- The access token provided is not authorized to retrieve this user's account