From fee59be2b37f9dab171a0885533120bfd0d5a140 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Fri, 3 Jul 2020 14:03:31 +0100 Subject: [PATCH 1/3] Start MSC2663 proposal Signed-off-by: Olivier Wilkinson (reivilibre) --- proposals/2663-define-nonexistent-push-rule-enable.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 proposals/2663-define-nonexistent-push-rule-enable.md diff --git a/proposals/2663-define-nonexistent-push-rule-enable.md b/proposals/2663-define-nonexistent-push-rule-enable.md new file mode 100644 index 00000000000..5cbb93f46e2 --- /dev/null +++ b/proposals/2663-define-nonexistent-push-rule-enable.md @@ -0,0 +1,2 @@ +# MSC2663 + From 90a37cdb3092204dc7a1f5860f764f649818d3e2 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Mon, 6 Jul 2020 12:36:08 +0100 Subject: [PATCH 2/3] Write MSC2663 --- ...663-define-nonexistent-push-rule-enable.md | 2 - .../2663-errors-nonexistent-push-rules.md | 44 +++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) delete mode 100644 proposals/2663-define-nonexistent-push-rule-enable.md create mode 100644 proposals/2663-errors-nonexistent-push-rules.md diff --git a/proposals/2663-define-nonexistent-push-rule-enable.md b/proposals/2663-define-nonexistent-push-rule-enable.md deleted file mode 100644 index 5cbb93f46e2..00000000000 --- a/proposals/2663-define-nonexistent-push-rule-enable.md +++ /dev/null @@ -1,2 +0,0 @@ -# MSC2663 - diff --git a/proposals/2663-errors-nonexistent-push-rules.md b/proposals/2663-errors-nonexistent-push-rules.md new file mode 100644 index 00000000000..ba0a5446acb --- /dev/null +++ b/proposals/2663-errors-nonexistent-push-rules.md @@ -0,0 +1,44 @@ +# MSC2663: Errors for dealing with inexistent push rules + +This MSC proposes that homeservers respond with a HTTP 404 ('Not Found') status +code and an `errcode` of `M_NOT_FOUND` when a client attempts to read or write +the `enabled` status or `actions` of a non-existent push rule. + +## Background + +The current revision of the Client-Server specification does not make clear what +a homeserver implementation is meant to do when getting or setting the `enabled` +or `actions` properties of a supposed push rule that does not exist. + +## Motivation + +This change is considered minor and the proposed error code is deemed +unsurprising as it matches the remainder of the specification. + +## Proposal + +The following endpoints of the Client-Server specification are affected: + +- `GET /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}` +- `DELETE /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}` +- `PUT /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}` +- `GET /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/enabled` +- `PUT /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/enabled` +- `GET /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/actions` +- `PUT /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/actions` + +The affected endpoints will have the following response status code added: + +**Status code 404:** + +The push rule does not exist. + +**Example** +```json +{ + "errcode": "M_NOT_FOUND" +} +``` + +This error response is to be returned when the push rule represented by +`{scope}/{kind}/{ruleId}` does not exist. From 3dd5bc42a721a369ce4aee94a66957b1916f9361 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Fri, 17 Jul 2020 13:06:13 +0100 Subject: [PATCH 3/3] inexistent may or may not be a non-existent word Signed-off-by: Olivier Wilkinson (reivilibre) --- proposals/2663-errors-nonexistent-push-rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/2663-errors-nonexistent-push-rules.md b/proposals/2663-errors-nonexistent-push-rules.md index ba0a5446acb..19f3e89a9ff 100644 --- a/proposals/2663-errors-nonexistent-push-rules.md +++ b/proposals/2663-errors-nonexistent-push-rules.md @@ -1,4 +1,4 @@ -# MSC2663: Errors for dealing with inexistent push rules +# MSC2663: Errors for dealing with non-existent push rules This MSC proposes that homeservers respond with a HTTP 404 ('Not Found') status code and an `errcode` of `M_NOT_FOUND` when a client attempts to read or write