From acc777cfb41848a1e854c0f3c8697938348dcf85 Mon Sep 17 00:00:00 2001 From: Jason Schroth Date: Thu, 20 Jun 2024 20:05:26 -0700 Subject: [PATCH] Adding TimeoutError handling (#4856) Added another exception object for TimeoutError --- src/dispatch/plugins/dispatch_slack/service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dispatch/plugins/dispatch_slack/service.py b/src/dispatch/plugins/dispatch_slack/service.py index 3c8e9089815e..a3702787fc29 100644 --- a/src/dispatch/plugins/dispatch_slack/service.py +++ b/src/dispatch/plugins/dispatch_slack/service.py @@ -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: