mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:04:50 -04:00
As yet fairly untested GET API for push rules
This commit is contained in:
parent
673773b217
commit
8a850573c9
3 changed files with 145 additions and 15 deletions
|
@ -87,13 +87,25 @@ class UnrecognizedRequestError(SynapseError):
|
|||
"""An error indicating we don't understand the request you're trying to make"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
if "errcode" not in kwargs:
|
||||
kwargs["errcode"] = Codes.NOT_FOUND
|
||||
kwargs["errcode"] = Codes.UNRECOGNIZED
|
||||
super(UnrecognizedRequestError, self).__init__(
|
||||
400,
|
||||
"Unrecognized request",
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
||||
class NotFoundError(SynapseError):
|
||||
"""An error indicating we can't find the thing you asked for"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
if "errcode" not in kwargs:
|
||||
kwargs["errcode"] = Codes.NOT_FOUND
|
||||
super(UnrecognizedRequestError, self).__init__(
|
||||
404,
|
||||
"Not found",
|
||||
**kwargs
|
||||
)
|
||||
|
||||
class AuthError(SynapseError):
|
||||
"""An error raised when there was a problem authorising an event."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue