Skip to content

feat(errors)!: preserve bridge error reasons across sdks - #365

Merged
Takaros999 merged 2 commits into
mainfrom
takis/bridge-error-reasons
Oct 28, 2026
Merged

Takaros999 merged 2 commits into
mainfrom
takis/bridge-error-reasons

Conversation

@Takaros999

Copy link
Copy Markdown
Contributor

This PR preserves bridge error details in SDK failure results.

  • Recognize challenge_failed and automatically decode optional, generic ErrorReason metadata; unknown strings become unknown, while missing/null reasons stay absent.
  • Preserve reasons through top-level and v4 bridge errors, polling/completion results, React hooks/widget callbacks, and Swift/Kotlin wrappers. No public parsing helper is added.
  • Keep known legacy reasons and add decoding examples, malformed-payload coverage, and Rust/TypeScript conformance checks.

Compatibility

Rust failures now use Status::Failed { error, reason }. Swift .failed/.failure cases gain an optional associated reason, so switch patterns must match both values. Kotlin failure records gain a nullable reason. Existing JavaScript callback arguments retain their positions; the widget reason is the optional third argument.

Validation

  • JavaScript build, type checks, tests, and formatting passed.
  • Rust tests: 167 passed; Clippy passed with all targets/features.
  • Rust/TypeScript conformance: 697 passed, plus HTTP bridge transcripts.
  • Host Swift tests: 15 passed; Kotlin SDK unit tests: 17 passed.

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
idkit-js-example Ready Ready Preview Oct 28, 2026 10:58pm UTC

Request Review

@Takaros999
Takaros999 requested a review from kchaw2005 as a code owner October 28, 2026 17:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T23:09:49.843165Z
We couldn’t complete this review. Comment @codex review to try again.
19938e4 Manual request
🔒 Security Review ⚠️ Failed 2026-10-28T23:09:50.229151Z
We couldn’t complete this review. Comment @codex security review to try again.
19938e4 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Takaros999

Copy link
Copy Markdown
Contributor Author

@codex review

@Takaros999

Copy link
Copy Markdown
Contributor Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

@Takaros999
Takaros999 merged commit b199567 into main Oct 28, 2026
23 checks passed
@Takaros999
Takaros999 deleted the takis/bridge-error-reasons branch October 28, 2026 23:35

This branch was successfully deployed

1 active deployment
Preview — 19938e4b Deployed Oct 28, 2026 by vercel[bot]
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