Skip to content

Show specific error messages for Slack auth extraction failures#36

Merged
devxoul merged 1 commit intomainfrom
fix/slack-auth-error-messages
Mar 5, 2026
Merged

Show specific error messages for Slack auth extraction failures#36
devxoul merged 1 commit intomainfrom
fix/slack-auth-error-messages

Conversation

@devxoul
Copy link
Owner

@devxoul devxoul commented Mar 5, 2026

Summary

  • Replace the generic "Extracted tokens are invalid" message with cause-specific errors so users can self-diagnose. Tracks SlackError.code from each failed workspace validation and maps it to an actionable message.

Changes

src/platforms/slack/commands/auth.ts

  • Collect SlackError.code from each failed workspace validation.
  • Add getExtractionErrorMessage() that maps failure codes to specific messages:
    • missing_cookie → "Cookie extraction failed. Make sure the Slack desktop app is installed and grant Keychain access when prompted."
    • invalid_auth → "Slack session has expired. Sign into the Slack desktop app, wait a few seconds, then re-run this command."
    • Default → original generic message (fallback).
  • Add hint field suggesting --debug when not already enabled.

src/platforms/slack/commands/auth.test.ts

  • Add 5 tests for getExtractionErrorMessage() covering each code, priority order, and edge cases.

Verified

  • bun test — 28 pass, 0 fail.
  • bun typecheck — clean.
  • bun lint — clean.

Summary by cubic

Show cause-specific error messages during Slack auth token extraction so users can diagnose issues without the generic failure message.

  • New Features
    • Map SlackError.code to actionable messages: missing_cookie (cookie/Keychain guidance), invalid_auth (session expired/sign-in guidance), with a generic fallback.
    • Track unique failure reasons during workspace validation and add a hint to run with --debug when not already enabled.
    • Add tests for getExtractionErrorMessage covering codes, priority order, and edge cases.

Written for commit 3b0ee0c. Summary will update on new commits.

…ures

Instead of one generic message for all failures, differentiate between
cookie extraction failure (Keychain access), expired sessions (invalid_auth),
and unknown errors so users can self-diagnose.
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agent-messenger Ignored Ignored Mar 5, 2026 0:28am

Request Review

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@devxoul devxoul merged commit ab1521c into main Mar 5, 2026
5 checks passed
@devxoul devxoul deleted the fix/slack-auth-error-messages branch March 5, 2026 12:34
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.

1 participant