Skip to content

Commit

Permalink
Adding TimeoutError handling (#4856)
Browse files Browse the repository at this point in the history
Added another exception object for TimeoutError
  • Loading branch information
jschroth authored and metroid-samus committed Sep 25, 2024
1 parent 8174238 commit 7b8d992
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dispatch/plugins/dispatch_slack/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ def make_call(client: WebClient, endpoint: str, **kwargs) -> SlackResponse:
log.warn(f"Timeout error {exception} for slack. Endpoint: {endpoint}. Kwargs: {kwargs}")
time.sleep(300)
raise TryAgain from None
except TimeoutError as exception:
log.warn(f"TimeoutError {exception} for slack. Endpoint: {endpoint}. Kwargs: {kwargs}")
time.sleep(300)
raise TryAgain from None


def list_conversation_messages(client: WebClient, conversation_id: str, **kwargs) -> SlackResponse:
Expand Down

0 comments on commit 7b8d992

Please sign in to comment.