Skip to content

fix(channels): extend user-visible error fallback to Discord, Slack, Signal, WhatsApp #60812

@garnetlyx

Description

@garnetlyx

Problem

When a message dispatch fails (provider error, rate limit, empty response), Telegram now sends the user a meaningful fallback message. All other channels silently drop the failure — the user receives nothing and has no way to know something went wrong.

Current behavior per channel

Channel On dispatch error
Telegram Sends user a typed fallback message (rate limit / empty response / general) ✅
LINE Sends a hardcoded "Sorry, I encountered an error..." string (no error routing) ⚠️
Discord Logs only — user sees nothing ❌
Slack Logs only — user sees nothing ❌
Signal Logs only — user sees nothing ❌
WhatsApp (web) Logs only — user sees nothing ❌

Proposed fix

Add the same fallback pattern to each channel's dispatch site:

  1. Track lastError via onError callback and outer try/catch
  2. Check delivery state after dispatch (nothing delivered + failure/skip)
  3. Send a user-visible message using resolveFailoverReasonFromError + EmptyResponseError routing (same logic as Telegram)

Extract the error-message-selection logic into a shared helper (e.g. src/auto-reply/reply/delivery-fallback.ts) so it isn't duplicated across channel files.

Related

  • Introduced in the model-fallback empty-response fix PR (see EmptyResponseError in src/agents/model-fallback.ts)
  • resolveFailoverReasonFromError already handles rate-limit / auth / timeout classification

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions