Skip to content

Try/catch is failing to catch an exception when directly inside route handler #285

Answered by pgjones
pamelafox asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure this is possible in general, as return Response(response_stream()) creates and defines a 200 streamed response i.e. once created it can't be changed within the generator to a json error response.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pamelafox
Comment options

Answer selected by pamelafox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants