Skip to content

Conversation

@sprezz-arthur
Copy link

Follow-up from #2147.

My attempt to solve the status code 500 on unmatched routes.
Solving it for http requests was quite straight-forward, as I could return 404 directly, but for websocket requests I could only manage to get a 403 by prematurely closing the connection before the handshake.

To make it non-breaking, I opted for extending URLRouter into ValidURLRouter, as some of the tests in tests/test_routing.py rely on having Exceptions raised.

@sprezz-arthur sprezz-arthur force-pushed the 1-return-4xx-on-unmatched-routes branch from 0ccf947 to de08c46 Compare June 8, 2025 22:38
@carltongibson
Copy link
Member

To make it non-breaking, I opted for extending URLRouter into ValidURLRouter, as some of the tests in tests/test_routing.py rely on having Exceptions raised.

You don't seem to have pushed that version 🤔

@sprezz-arthur sprezz-arthur force-pushed the 1-return-4xx-on-unmatched-routes branch from de08c46 to ea7535e Compare June 9, 2025 12:01
@sprezz-arthur
Copy link
Author

To make it non-breaking, I opted for extending URLRouter into ValidURLRouter, as some of the tests in tests/test_routing.py rely on having Exceptions raised.

You don't seem to have pushed that version 🤔

My bad, bad rebase, should be fine now.

@sprezz-arthur
Copy link
Author

Could we give it another go? 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants