I was testing an endpoint in my puzzle and raising a 404 on purpose. I was expecting a 404 in the response, but got a 200.
The custom_http_exception_handler is catching my HTTPException and returning a templated 404 page, but the TemplateResponse has status 200.
I was testing an endpoint in my puzzle and raising a 404 on purpose. I was expecting a 404 in the response, but got a 200. The
custom_http_exception_handler
is catching myHTTPException
and returning a templated 404 page, but theTemplateResponse
has status 200.https://github.com/AustralianSynchrotron/openday-scavenger/blob/ad7cc300c2b352b94e35bff23dd36e812fd33cc1/openday_scavenger/main.py#L105
Is that on purpose?
Possibly related to d669329758d72a495a792ee749483d65f5cb1bb5 in #64?