Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5257 from aaronraimist/fix-error-code-publicrooms
Browse files Browse the repository at this point in the history
Fix error code for invalid parameter
  • Loading branch information
erikjohnston authored May 25, 2019
2 parents fa1b293 + 6dac0e7 commit 338dca5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/5257.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix error code when there is an invalid parameter on /_matrix/client/r0/publicRooms
2 changes: 1 addition & 1 deletion synapse/http/servlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,)
Expand Down

0 comments on commit 338dca5

Please sign in to comment.