diff options
author | David Baker <dave@matrix.org> | 2015-01-23 11:19:02 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-01-23 11:19:02 +0000 |
commit | 49fe31792bc0cf709248e592baefb8f34606236a (patch) | |
tree | 26a3c5ea199bc3ae9d537eecfe5b128ad8402391 /synapse/api | |
parent | right super() param (diff) | |
download | synapse-49fe31792bc0cf709248e592baefb8f34606236a.tar.xz |
Add slightly pedantic trailing slash error.
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/errors.py | 7 |
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 ) |