Skip to content

fix: improve channel connect error diagnostics#1018

Merged
lefarcen merged 2 commits intomainfrom
fix/channel-connect-diagnostics
Apr 10, 2026
Merged

fix: improve channel connect error diagnostics#1018
lefarcen merged 2 commits intomainfrom
fix/channel-connect-diagnostics

Conversation

@lefarcen
Copy link
Copy Markdown
Collaborator

What

Improve Discord and Telegram connect error handling so users see accurate, localized failure messages and diagnostics include enough proxy/runtime context to debug real connection issues.

Why

Discord and Telegram connect failures were too opaque during user debugging:

  • the frontend could show misleading success-style messaging for connect failures
  • backend responses flattened distinct failure modes into generic connect errors
  • failure logs were missing the proxy/runtime context needed to quickly identify network and proxy issues

How

  • add structured channel connect error responses with code, phase, retryable, and requestId
  • classify Discord/Telegram failures into credential, app-id mismatch, timeout, network, persist, and sync phases
  • localize backend error descriptions from controller locale instead of surfacing raw internal errors
  • update web to show returned error messages for Telegram/Discord and stop treating generic connect failures as already-connected states
  • log proxy/runtime context on connect failures and bound async runtime health capture with a short timeout
  • regenerate OpenAPI and web SDK types for the new error contract

Affected areas

  • Desktop app (Electron shell)
  • Controller (backend / API)
  • Web dashboard (React UI)
  • OpenClaw runtime
  • Skills
  • Shared schemas / packages
  • Build / CI / Tooling

Checklist

  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes
  • pnpm generate-types run (if API routes/schemas changed)
  • No credentials or tokens in code or logs
  • No any types introduced (use unknown with narrowing)

Notes for reviewers

pnpm test hit an unrelated flaky failure in tests/desktop/skill-dir-watcher-workspace.test.ts (Timed out waiting for watcher state while waiting for agent-tool to appear for bot-1).

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1225f31426

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/controller/src/runtime/runtime-health.ts Outdated
@lefarcen lefarcen merged commit 5fecd34 into main Apr 10, 2026
12 of 13 checks passed
@mrcfps mrcfps deleted the fix/channel-connect-diagnostics branch April 10, 2026 09:07
@lefarcen lefarcen mentioned this pull request Apr 10, 2026
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.

2 participants