Search Options

Display Count
Sort
Preferred Language
Advanced Search

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

  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,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Apr 01 16:16:24 GMT 2026
    - 178.6K bytes
    - Click Count (0)
Back to Top