Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for route_with_http_exception (0.32 sec)

  1. tests/test_exception_handlers.py

            RequestValidationError: request_validation_exception_handler,
            Exception: server_error_exception_handler,
        }
    )
    
    client = TestClient(app)
    
    
    @app.get("/http-exception")
    def route_with_http_exception():
        raise HTTPException(status_code=400)
    
    
    @app.get("/request-validation/{param}/")
    def route_with_request_validation_exception(param: int):
        pass  # pragma: no cover
    
    
    @app.get("/server-error")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.9K bytes
    - Viewed (0)
Back to top