Skip to content

fix(slack): treat is_archived as a destination-not-found error - #2428

Merged
haritamar merged 1 commit into
masterfrom
devin/1796210327-slack-is-archived-destination-error
Dec 2, 2026
Merged

haritamar merged 1 commit into
masterfrom
devin/1796210327-slack-is-archived-destination-error

Conversation

@haritamar

@haritamar haritamar commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Sending to an archived Slack channel raised a plain MessagingIntegrationError, which callers treat as "the integration is broken" rather than "this destination is misconfigured" — in Elementary Cloud that paged the on-call rotation instead of opening a customer issue (PagerDuty #3127, Hibob's archived dbt-governance-test-alerts).

_handle_send_err now maps is_archived to MessagingIntegrationDestinationNotFoundError (the same class as channel_not_found), with a message telling the user to unarchive the channel or remove it from the alert settings.

An existing test asserted the old behavior for is_archived; it and test_send_error_keeps_slack_error_code now use ratelimited as the generic-error example.

Linear: CORE-1826

Link to Devin session: https://app.devin.ai/sessions/001c95c1e5e74c64b062067800cfdfd3
Open in Devin Desktop: https://app.devin.ai/desktop/session/001c95c1e5e74c64b062067800cfdfd3?variant=devin
Requested by: @haritamar


🟢 Devin Review found nothing to fix · View findings

Devin Review

Summary by CodeRabbit

  • Bug Fixes
    • Archived Slack channels are now reported as unavailable destinations, with guidance to unarchive the channel or remove it from alert settings.

Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

👋 @haritamar
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@jonlevine7

jonlevine7 commented Dec 2, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Slack web integration now maps Slack’s is_archived send error to MessagingIntegrationDestinationNotFoundError. Tests cover the archived-channel message and cause, and use ratelimited for generic Slack-error handling.

Changes: Slack send error mapping

Layer / File(s) Summary
Archived-channel error mapping and tests
elementary/messages/messaging_integrations/slack_web.py, tests/unit/messages/messaging_integrations/test_slack_web.py
The send-error handler maps is_archived to MessagingIntegrationDestinationNotFoundError. Tests check the channel name, archived status, and original Slack error as the cause. Generic-error tests use ratelimited.

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: eladbarkay, mikakerman

Merge Risk: Minimal · up to 01e5e

Archived Slack channels now produce a clear destination-not-found error with guidance to unarchive the channel or remove it from alert settings. The change is small, covered by tests, and easy to revert, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: Slack's is_archived error now raises MessagingIntegrationDestinationNotFoundError. The raw summary confirms that _handle_send_err maps is_archived to this error, and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: Slack's is_archived error now raises MessagingIntegrationDestinationNotFoundError. The raw summary confirms that _handle_send_err maps is_archived to this error, and the tests cover it. The title uses the conventional fix(slack) prefix and is specific, so it matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 6c7d9222-89c6-494d-a1ac-91892a29950e
Commits

Reviewing files that changed from the base of the PR and between bd1df89 and 01e5e66.

Files selected for processing: 2

  • elementary/messages/messaging_integrations/slack_web.py
  • tests/unit/messages/messaging_integrations/test_slack_web.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@haritamar
haritamar merged commit 7fd966a into master Dec 2, 2026
35 of 36 checks passed
@haritamar
haritamar deleted the devin/1796210327-slack-is-archived-destination-error branch December 2, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants