Skip to content

Commit

Permalink
Catch asyncio.TimeoutError exception (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipgolem authored Apr 8, 2021
1 parent ffd6048 commit 28eb3d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yapapi/rest/market.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ async def confirm(self) -> bool:
try:
await self._api.wait_for_approval(self._id, timeout=15, _request_timeout=16)
return True
except asyncio.TimeoutError:
logger.debug("waitForApproval(%s): client-side timeout", self._id, exc_info=True)
return False
except ApiException:
logger.debug("waitForApproval(%s) raised ApiException", self._id, exc_info=True)
return False
Expand Down

0 comments on commit 28eb3d3

Please sign in to comment.