mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-07 23:02:04 +00:00
Merge pull request #5257 from aaronraimist/fix-error-code-publicrooms
Fix error code for invalid parameter
This commit is contained in:
commit
338dca58c0
1
changelog.d/5257.bugfix
Normal file
1
changelog.d/5257.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix error code when there is an invalid parameter on /_matrix/client/r0/publicRooms
|
@ -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,)
|
||||
|
Loading…
Reference in New Issue
Block a user