diff --git a/aiohttp/client_proto.py b/aiohttp/client_proto.py index 12de7ab5b24..604b954903e 100644 --- a/aiohttp/client_proto.py +++ b/aiohttp/client_proto.py @@ -93,11 +93,11 @@ def connection_lost(self, exc: Optional[BaseException]) -> None: if self._parser is not None: try: uncompleted = self._parser.feed_eof() - except Exception: + except Exception as e: if self._payload is not None: - self._payload.set_exception( - ClientPayloadError("Response payload is not completed") - ) + exc = ClientPayloadError("Response payload is not completed") + exc.__cause__ = e + self._payload.set_exception(exc) if not self.is_eof(): if isinstance(exc, OSError):