Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for UnicornException (0.08 sec)

  1. fastapi/applications.py

            from fastapi.responses import JSONResponse
    
    
            class UnicornException(Exception):
                def __init__(self, name: str):
                    self.name = name
    
    
            app = FastAPI()
    
    
            @app.exception_handler(UnicornException)
            async def unicorn_exception_handler(request: Request, exc: UnicornException):
                return JSONResponse(
                    status_code=418,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 176.3K bytes
    - Viewed (0)
Back to top