Skip to content

Expose control plane server error details - #43

Merged
undivisible merged 5 commits into
mainfrom
fix/control-plane-server-errors
Nov 3, 2026
Merged

undivisible merged 5 commits into
mainfrom
fix/control-plane-server-errors

Conversation

@undivisible

@undivisible undivisible commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Expose recognized server error codes as enumerable serverCode; map unrecognized values to the explicit unknown sentinel, while preserving the existing safe default text and allowlisted code.
  • Do not retain or expose unmarked server messages.
  • Cover message, missing-message and malformed-response cases.

Verification

  • bun run test (526 passed)
  • bun run typecheck
  • git diff --check

Follow-up

The server does not currently mark messages as user-facing. Define and implement an explicit user-facing message contract before the SDK propagates any server message. This PR does not publish an npm release.

Unrecognized codes map to unknown because the server does not currently guarantee that the code field contains only a public identifier. A server-side code contract is needed before exposing arbitrary new codes.

@undivisible
undivisible marked this pull request as ready for review November 3, 2026 07:19
@undivisible
undivisible merged commit 41b0659 into main Nov 3, 2026
12 checks passed
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