Skip to content

Commit

Permalink
Catch aiohttp.ClientPayloadError
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Feb 19, 2024
1 parent c57d996 commit 5e57640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4186,7 +4186,7 @@ async def send_chunk(

response.release()
raise InvalidContentTypeError(f"Expected {expected_response_type}, unexpected data received: {data!r}")
except (aiohttp.ClientConnectorError, aiohttp.ClientOSError, aiohttp.ServerConnectionError) as err:
except (aiohttp.ClientConnectorError, aiohttp.ClientOSError, aiohttp.ServerConnectionError, aiohttp.ClientPayloadError) as err:
if retry <= 0:
_LOGGER.debug("Host %s:%s: connection error: %s", self._host, self._port, str(err))
await self.expire_session()
Expand Down

0 comments on commit 5e57640

Please sign in to comment.