summary refs log tree commit diff
path: root/synapse/http/servlet.py
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2021-12-09 12:23:34 +0100
committerGitHub <noreply@github.com>2021-12-09 11:23:34 +0000
commitb3bcacf3c1c72bfadeb46fe4d0198ca155a8c615 (patch)
tree7cb5897cd377fd8c41ac310aff68bf16de2f4d2a /synapse/http/servlet.py
parentAllow guests to send state events (#11378) (diff)
downloadsynapse-b3bcacf3c1c72bfadeb46fe4d0198ca155a8c615.tar.xz
Add missing `errcode` to `parse_string` and `parse_boolean` (#11542)
Diffstat (limited to 'synapse/http/servlet.py')
-rw-r--r--synapse/http/servlet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py
index 6dd9b9ad03..1627225f28 100644
--- a/synapse/http/servlet.py
+++ b/synapse/http/servlet.py
@@ -246,7 +246,7 @@ def parse_boolean_from_args(
             message = (
                 "Boolean query parameter %r must be one of ['true', 'false']"
             ) % (name,)
-            raise SynapseError(400, message)
+            raise SynapseError(400, message, errcode=Codes.INVALID_PARAM)
     else:
         if required:
             message = "Missing boolean query parameter %r" % (name,)
@@ -414,7 +414,7 @@ def _parse_string_value(
             name,
             ", ".join(repr(v) for v in allowed_values),
         )
-        raise SynapseError(400, message)
+        raise SynapseError(400, message, errcode=Codes.INVALID_PARAM)
     else:
         return value_str