(self, request: Request, exc: Exception)
| 63 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) |
| 64 | |
| 65 | async def http_exception(self, request: Request, exc: Exception) -> Response: |
| 66 | assert isinstance(exc, HTTPException) |
| 67 | if exc.status_code in {204, 304}: |
| 68 | return Response(status_code=exc.status_code, headers=exc.headers) |
| 69 | return PlainTextResponse(exc.detail, status_code=exc.status_code, headers=exc.headers) |
| 70 | |
| 71 | async def websocket_exception(self, websocket: WebSocket, exc: Exception) -> None: |
| 72 | assert isinstance(exc, WebSocketException) |
nothing calls this directly
no test coverage detected