config#

Documentation for the config module.

Module-level Litestar plugin configuration singletons.

app.config.problem_details = ProblemDetailsConfig(exception_handler=<function _problem_details_exception_handler>, enable_for_all_http_exceptions=True, exception_to_problem_detail_map={<class 'litestar.exceptions.http_exceptions.HTTPException'>: <function to_problem_details>, <class 'litestar.exceptions.http_exceptions.NotFoundException'>: <function to_problem_details>})#

Renders every HTTP error as one problem details envelope.

enable_for_all_http_exceptions is what tells litestar-security to document its routes’ errors as application/problem+json; the map then replaces the plugin’s own conversion with to_problem_details.

NotFoundException is mapped on its own because the Vite plugin otherwise answers it with an empty body.