Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/dispatch/plugins/dispatch_slack/incident/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,10 @@ def handle_after_hours_message(
participant = participant_service.get_by_incident_id_and_email(
db_session=db_session, incident_id=context["subject"].id, email=user.email
)
# handle no participant found
if not participant:
return

# get their timezone from slack
try:
owner_tz = (dispatch_slack_service.get_user_info_by_email(client, email=owner_email))["tz"]
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/plugins/dispatch_slack/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def should_retry(exception: Exception) -> bool:
match exception:
case SlackApiError():
# Don't retry for re-adding users in channel.
if exception.response["error"] == SlackAPIErrorCode.USER_IN_CHANNEL:
if exception.response["error"] in [SlackAPIErrorCode.USER_IN_CHANNEL, SlackAPIErrorCode.ALREADY_IN_CHANNEL]:
return False
# Retry if it's not a fatal error
return exception.response["error"] != SlackAPIErrorCode.FATAL_ERROR
Expand Down