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

Commit

Permalink
Return a 404 instead of 400 for unrecognized requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Dec 5, 2022
1 parent f282db1 commit 2dc4b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/http/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def _unrecognised_request_handler(request: Request) -> NoReturn:
Args:
request: Unused, but passed in to match the signature of ServletCallback.
"""
raise UnrecognizedRequestError()
raise UnrecognizedRequestError(code=404)


class UnrecognizedRequestResource(resource.Resource):
Expand Down

0 comments on commit 2dc4b32

Please sign in to comment.