- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for custom_http_exception_handler (0.12 seconds)
-
docs_src/handling_errors/tutorial006_py39.py
) from fastapi.exceptions import RequestValidationError from starlette.exceptions import HTTPException as StarletteHTTPException app = FastAPI() @app.exception_handler(StarletteHTTPException) async def custom_http_exception_handler(request, exc): print(f"OMG! An HTTP error!: {repr(exc)}") return await http_exception_handler(request, exc) @app.exception_handler(RequestValidationError)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 928 bytes - Click Count (0)