0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 04:33:53 +01:00

Merge pull request #5257 from aaronraimist/fix-error-code-publicrooms

Fix error code for invalid parameter
This commit is contained in:
Erik Johnston 2019-05-25 14:09:27 +01:00 committed by GitHub
commit 338dca58c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/5257.bugfix Normal file
View file

@ -0,0 +1 @@
Fix error code when there is an invalid parameter on /_matrix/client/r0/publicRooms

View file

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