Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExceptionCapture (0.05 sec)

  1. tests/test_validation_error_context.py

    
    class Item(BaseModel):
        id: int
        name: str
    
    
    class ExceptionCapture:
        def __init__(self):
            self.exception = None
    
        def capture(self, exc):
            self.exception = exc
            return exc
    
    
    app = FastAPI()
    sub_app = FastAPI()
    captured_exception = ExceptionCapture()
    
    app.mount(path="/sub", app=sub_app)
    
    
    @app.exception_handler(RequestValidationError)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 06 12:21:57 UTC 2025
    - 4.7K bytes
    - Viewed (0)
Back to top