Skip to content

Should custom_http_exception_handler return 404 when handling a 404? #74

@luigiferiani

Description

@luigiferiani

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.

return templates.TemplateResponse(request=request, name="404_general.html")

Is that on purpose?

Possibly related to d669329 in #64?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions