summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-14 11:57:25 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-14 11:57:25 +0100
commit2a793a6c422e24a064b034f7dcdab816a667af73 (patch)
tree5bc282de6d029dbfc4860f57a8997aae57b215ac /synapse/api/errors.py
parentAdded web client prefix (diff)
downloadsynapse-2a793a6c422e24a064b034f7dcdab816a667af73.tar.xz
Default error code BAD_PAGINATION for EventStreamErrors
Diffstat (limited to '')
-rw-r--r--synapse/api/errors.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index 8b9766fab7..b5970c959b 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -74,7 +74,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):