Skip to content

Commit

Permalink
continue on internal error (#3728)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx authored Jan 28, 2025
1 parent 8d62b99 commit 42d6d93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/onyx/connectors/slack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ def rate_limited_call(**kwargs: Any) -> SlackResponse:
f"Slack call rate limited, retrying after {retry_after} seconds. Exception: {e}"
)
time.sleep(retry_after)
elif error in ["already_reacted", "no_reaction"]:
# The response isn't used for reactions, this is basically just a pass
elif error in ["already_reacted", "no_reaction", "internal_error"]:
# Log internal_error and return the response instead of failing
logger.warning(
f"Slack call encountered '{error}', skipping and continuing..."
)
return e.response
else:
# Raise the error for non-transient errors
Expand Down

0 comments on commit 42d6d93

Please sign in to comment.