[BUG] Exception Handlers Return 200 Status Code Instead of Original Error Code #633
Closed
4 tasks done
Labels
bug
Something isn't working
@jph00
When using custom exception handlers, the response status code defaults to 200 instead of preserving the original error code. This occurs unless explicitly returning a HTMLResponse with the correct status code.
This can be worked around by explicitly returning a Response with the correct status code, but maybe documented?
For example:
fasthtml/examples/adv_app.py
Line 65 in 0d05029
Related: #460
Minimal example:
Output:
Environment Information
Confirmation
Please confirm the following:
The text was updated successfully, but these errors were encountered: