From 10267df76eec6c6a77ccb69890e6b6eaf81ba6f8 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 24 Mar 2021 16:33:13 +0000 Subject: [PATCH] Add missing 403/404 response codes --- proposals/2403-knock.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/proposals/2403-knock.md b/proposals/2403-knock.md index cd89fe23a..9972c04c4 100644 --- a/proposals/2403-knock.md +++ b/proposals/2403-knock.md @@ -75,6 +75,15 @@ The user wasn't allowed to knock (e.g. they are banned). Example error reply: } ``` +##### Status code 404: +The room was not found. Example error reply: +```json +{ + "errcode": "M_NOT_FOUND", + "error": "Unknown room." +} +``` + ### Extensions to `GET /_matrix/client/r0/sync` In [the response to @@ -289,6 +298,15 @@ This request was invalid, e.g. bad JSON. Example reply: } ``` +##### Status code 403: +This request is forbidden, e.g. the user is banned from the room. Example reply: +```json +{ + "errcode": "M_FORBIDDEN", + "error": "You are not allowed to knock on this room" +} +``` + ##### Status code 404: The room is unknown to the remote server. Example reply: ```json @@ -399,6 +417,24 @@ request content. } ``` +##### Status code 403: +This request is forbidden, e.g. the user is banned from the room. Example reply: +```json +{ + "errcode": "M_FORBIDDEN", + "error": "You are not allowed to knock on this room" +} +``` + +##### Status code 404: +The room is unknown to the remote server. Example reply: +```json +{ + "errcode": "M_NOT_FOUND", + "error": "Unknown room" +} +``` + ## Restrictions There are restrictions to being able to set this membership, as well as accepting or denying the knock. A formal description of the changes to the auth rules is given below;