mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-07-29 12:38:33 -04:00
Respond with proper error responses on unknown paths. (#14621)
Returns a proper 404 with an errcode of M_RECOGNIZED for unknown endpoints per MSC3743.
This commit is contained in:
parent
da77720752
commit
9d8a3234ba
9 changed files with 32 additions and 14 deletions
|
@ -174,7 +174,7 @@ class JsonResourceTests(unittest.TestCase):
|
|||
self.reactor, FakeSite(res, self.reactor), b"GET", b"/_matrix/foobar"
|
||||
)
|
||||
|
||||
self.assertEqual(channel.code, 400)
|
||||
self.assertEqual(channel.code, 404)
|
||||
self.assertEqual(channel.json_body["error"], "Unrecognized request")
|
||||
self.assertEqual(channel.json_body["errcode"], "M_UNRECOGNIZED")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue