diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-15 11:50:14 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-15 11:50:14 +0100 |
commit | d72f897f078fa72548522440149369293f0d12b2 (patch) | |
tree | 4e8d692713f73389b89dea4fdba719b696c9f3af /synapse/api/errors.py | |
parent | Reimplement the get public rooms api to work with new DB schema (diff) | |
parent | Add a check to make sure that during state conflict res we only request a PDU... (diff) | |
download | synapse-d72f897f078fa72548522440149369293f0d12b2.tar.xz |
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts: synapse/storage/stream.py
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r-- | synapse/api/errors.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py index 8b9766fab7..21ededc5ae 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -27,6 +27,7 @@ class Codes(object): BAD_PAGINATION = "M_BAD_PAGINATION" UNKNOWN = "M_UNKNOWN" NOT_FOUND = "M_NOT_FOUND" + UNKNOWN_TOKEN = "M_UNKNOWN_TOKEN" class CodeMessageException(Exception): @@ -74,7 +75,10 @@ class AuthError(SynapseError): class EventStreamError(SynapseError): """An error raised when there a problem with the event stream.""" - pass + def __init__(self, *args, **kwargs): + if "errcode" not in kwargs: + kwargs["errcode"] = Codes.BAD_PAGINATION + super(EventStreamError, self).__init__(*args, **kwargs) class LoginError(SynapseError): |