Bug: MediaType not respected for ExceptionHandlerMiddleware
#2024
Labels
Bug 🐛
This is something that is not working as expected
ExceptionHandlerMiddleware
#2024
Description
MediaType not respected when
debug=False
inlitestar.middleware.exceptions.middleware.ExceptionHandlerMiddleware
#2011 We fixed the tests but this raises another issue of not respecting mediatype for exception response when not in debug - we shouldnt send back json in debug=False
Originally posted by @JacobCoffee in #2011 (comment)
URL to code causing the issue
https://github.com/JacobCoffee/litestar/blob/9d51278d17f3ef32390b9e9ae26cd312d16eab62/litestar/middleware/exceptions/middleware.py#L127
litestar/litestar/middleware/exceptions/middleware.py
Line 127 in 9d51278
MCVE
Steps to reproduce
Screenshots
No response
Logs
No response
Litestar Version
2.0b3
Platform
Funding
The text was updated successfully, but these errors were encountered: