- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for http_exception_handler (0.09 sec)
-
fastapi/exception_handlers.py
from starlette.requests import Request from starlette.responses import JSONResponse, Response from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION async def http_exception_handler(request: Request, exc: HTTPException) -> Response: headers = getattr(exc, "headers", None) if not is_body_allowed_for_status_code(exc.status_code): return Response(status_code=exc.status_code, headers=headers)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 19:08:14 UTC 2023 - 1.3K bytes - Viewed (0) -
fastapi/applications.py
Sequence, Type, TypeVar, Union, ) from fastapi import routing from fastapi.datastructures import Default, DefaultPlaceholder from fastapi.exception_handlers import ( http_exception_handler, request_validation_exception_handler, websocket_request_validation_exception_handler, ) from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError from fastapi.logger import logger
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:52:31 UTC 2024 - 172.2K bytes - Viewed (0)