0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-18 00:13:52 +01:00

Fix error code for invalid parameter

Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
Aaron Raimist 2019-05-24 17:13:10 -05:00
parent dd64b9dbdd
commit 2d4853039f
No known key found for this signature in database
GPG key ID: 37419210002890EF

View file

@ -55,7 +55,7 @@ def parse_integer_from_args(args, name, default=None, required=False):
return int(args[name][0])
except Exception:
message = "Query parameter %r must be an integer" % (name,)
raise SynapseError(400, message)
raise SynapseError(400, message, errcode=Codes.INVALID_PARAM)
else:
if required:
message = "Missing integer query parameter %r" % (name,)