diff --git a/starlette/middleware/exceptions.py b/starlette/middleware/exceptions.py index d708929e3..981d2fcae 100644 --- a/starlette/middleware/exceptions.py +++ b/starlette/middleware/exceptions.py @@ -28,7 +28,7 @@ def __init__( HTTPException: self.http_exception, WebSocketException: self.websocket_exception, } - if handlers is not None: + if handlers is not None: # pragma: no branch for key, value in handlers.items(): self.add_exception_handler(key, value)