summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-23 11:19:02 +0000
committerDavid Baker <dave@matrix.org>2015-01-23 11:19:02 +0000
commit49fe31792bc0cf709248e592baefb8f34606236a (patch)
tree26a3c5ea199bc3ae9d537eecfe5b128ad8402391 /synapse/api
parentright super() param (diff)
downloadsynapse-49fe31792bc0cf709248e592baefb8f34606236a.tar.xz
Add slightly pedantic trailing slash error.
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/errors.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index 4f59e1742c..5872e82d0f 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -88,9 +88,14 @@ class UnrecognizedRequestError(SynapseError):
     def __init__(self, *args, **kwargs):
         if "errcode" not in kwargs:
             kwargs["errcode"] = Codes.UNRECOGNIZED
+        message = None
+        if len(args) == 0:
+            message = "Unrecognized request"
+        else:
+            message = args[0]
         super(UnrecognizedRequestError, self).__init__(
             400,
-            "Unrecognized request",
+            message,
             **kwargs
         )