Skip to content

cxp-689 return not found on no such subteam - #95

Merged
agustin-conductor merged 1 commit into
mainfrom
bugfix/no-such-subteam-error
Jun 25, 2026
Merged

cxp-689 return not found on no such subteam#95
agustin-conductor merged 1 commit into
mainfrom
bugfix/no-such-subteam-error

Conversation

@agustin-conductor

Copy link
Copy Markdown
Contributor

No description provided.

@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

CXP-689

@github-actions

Copy link
Copy Markdown
Contributor

Connector PR Review: cxp-689 return not found on no such subteam

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 3ee9e76eca74.
Review mode: full
View review run

Review Summary

The full PR diff was scanned for security and correctness. This is a one-line behavior change in pkg/connector/client/helpers.go that remaps the Slack no_such_subteam error from codes.Unavailable (SDK auto-retry) to codes.NotFound so a disabled/deleted subteam is skipped during userGroup Grants sync instead of retried. The change is internally consistent — Grants() propagates the wrapped error via client.WrapError, and NotFound lets the SDK skip that resource and continue. Note this intentionally reverses a prior empirically-motivated fix; verify that no_such_subteam is genuinely a permanent (deleted/disabled) condition rather than transient, since true transients will no longer be retried. No new security or correctness issues found.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • pkg/connector/client/slack.go:22-24 — The SlackErrNoSuchSubteam constant's doc comment still states "Retrying on this error was determined empirically to allow syncs to complete," which now contradicts the new NotFound (no-retry) mapping. Update it to reflect the disabled/deleted-subteam skip behavior.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In `pkg/connector/client/slack.go`:
- Around line 22-24: The doc comment for the `SlackErrNoSuchSubteam` constant still
  describes the old behavior ("Retrying on this error was determined empirically to
  allow syncs to complete"). This now contradicts the updated mapping in
  pkg/connector/client/helpers.go, which returns codes.NotFound (no retry). Update the
  comment to explain that no_such_subteam indicates a disabled/deleted subteam and is
  mapped to NotFound so the resource's grants are skipped rather than retried.

@github-actions github-actions 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.

No blocking issues found.

@agustin-conductor
agustin-conductor merged commit 661a1cc into main Jun 25, 2026
11 checks passed
@agustin-conductor
agustin-conductor deleted the bugfix/no-such-subteam-error branch June 25, 2026 13:46
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