(self, scope: Scope, receive: Receive, send: Send)
| 620 | self.middleware_stack = RequestBodyLimitMiddleware(self.middleware_stack, max_body_size=max_body_size) |
| 621 | |
| 622 | async def not_found(self, scope: Scope, receive: Receive, send: Send) -> None: |
| 623 | if scope["type"] == "websocket": |
| 624 | websocket_close = WebSocketClose() |
| 625 | await websocket_close(scope, receive, send) |
| 626 | return |
| 627 | |
| 628 | # If we're running inside a starlette application then raise an |
| 629 | # exception, so that the configurable exception handler can deal with |
| 630 | # returning the response. For plain ASGI apps, just return the response. |
| 631 | if "app" in scope: |
| 632 | raise HTTPException(status_code=404) |
| 633 | else: |
| 634 | response = PlainTextResponse("Not Found", status_code=404) |
| 635 | await response(scope, receive, send) |
| 636 | |
| 637 | def url_path_for(self, name: str, /, **path_params: Any) -> URLPath: |
| 638 | for route in self.routes: |
nothing calls this directly
no test coverage detected