summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-22 19:32:17 +0000
committerDavid Baker <dave@matrix.org>2015-01-22 19:32:17 +0000
commit8a850573c9cf50dd83ba47c033b28fe2bbbaf9d4 (patch)
tree2d61c19377aebe7d855061dde7bb91fc154a0e63 /synapse/api
parentoops, this is not its own schema file (diff)
downloadsynapse-8a850573c9cf50dd83ba47c033b28fe2bbbaf9d4.tar.xz
As yet fairly untested GET API for push rules
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/errors.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py

index 55181fe77e..01207282d6 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -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."""