diff --git a/uvicorn/protocols/http/h11_impl.py b/uvicorn/protocols/http/h11_impl.py index d0b202e3a..044b503dd 100644 --- a/uvicorn/protocols/http/h11_impl.py +++ b/uvicorn/protocols/http/h11_impl.py @@ -205,9 +205,9 @@ def handle_events(self) -> None: while True: try: event = self.conn.next_event() - except h11.RemoteProtocolError: + except h11.RemoteProtocolError as exc: msg = "Invalid HTTP request received." - self.logger.warning(msg) + self.logger.warning(msg, exc_info=exc) self.send_400_response(msg) return event_type = type(event)