Skip to content

Commit

Permalink
Add 404 error responses to push rule endpoints
Browse files Browse the repository at this point in the history
MSC: #2663
  • Loading branch information
turt2live committed Sep 30, 2020
1 parent 5610436 commit 5e60ff8
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
70 changes: 70 additions & 0 deletions api/client-server/pushrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,16 @@ paths:
allOf: [
"$ref": "definitions/push_rule.yaml"
]
404:
description: |-
The push rule does not exist.
examples:
application/json: {
"errcode": "M_NOT_FOUND",
"error": "The push rule was not found."
}
schema:
"$ref": "definitions/errors/error.yaml"
tags:
- Push notifications
delete:
Expand Down Expand Up @@ -340,6 +350,16 @@ paths:
}
schema:
type: object # empty json object
404:
description: |-
The push rule does not exist.
examples:
application/json: {
"errcode": "M_NOT_FOUND",
"error": "The push rule was not found."
}
schema:
"$ref": "definitions/errors/error.yaml"
tags:
- Push notifications
put:
Expand Down Expand Up @@ -446,6 +466,16 @@ paths:
}
schema:
"$ref": "definitions/errors/error.yaml"
404:
description: |-
The push rule does not exist (when updating a push rule).
examples:
application/json: {
"errcode": "M_NOT_FOUND",
"error": "The push rule was not found."
}
schema:
"$ref": "definitions/errors/error.yaml"
429:
description: This request was rate-limited.
schema:
Expand Down Expand Up @@ -498,6 +528,16 @@ paths:
type: boolean
description: Whether the push rule is enabled or not.
required: ["enabled"]
404:
description: |-
The push rule does not exist.
examples:
application/json: {
"errcode": "M_NOT_FOUND",
"error": "The push rule was not found."
}
schema:
"$ref": "definitions/errors/error.yaml"
tags:
- Push notifications
put:
Expand Down Expand Up @@ -553,6 +593,16 @@ paths:
}
schema:
type: object
404:
description: |-
The push rule does not exist.
examples:
application/json: {
"errcode": "M_NOT_FOUND",
"error": "The push rule was not found."
}
schema:
"$ref": "definitions/errors/error.yaml"
tags:
- Push notifications
"/pushrules/{scope}/{kind}/{ruleId}/actions":
Expand Down Expand Up @@ -608,6 +658,16 @@ paths:
- string
- object
required: ["actions"]
404:
description: |-
The push rule does not exist.
examples:
application/json: {
"errcode": "M_NOT_FOUND",
"error": "The push rule was not found."
}
schema:
"$ref": "definitions/errors/error.yaml"
tags:
- Push notifications
put:
Expand Down Expand Up @@ -671,5 +731,15 @@ paths:
}
schema:
type: object
404:
description: |-
The push rule does not exist.
examples:
application/json: {
"errcode": "M_NOT_FOUND",
"error": "The push rule was not found."
}
schema:
"$ref": "definitions/errors/error.yaml"
tags:
- Push notifications
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/2796.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a 404 ``M_NOT_FOUND`` error to push rule endpoints as per `MSC2663 <https://github.com/matrix-org/matrix-doc/pull/2663>`_.

0 comments on commit 5e60ff8

Please sign in to comment.