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_exceptionsis what tellslitestar-securityto document its routes’ errors asapplication/problem+json; the map then replaces the plugin’s own conversion withto_problem_details.NotFoundExceptionis mapped on its own because the Vite plugin otherwise answers it with an empty body.