Skip to content

chore: Improve loggging#211

Open
Takaros999 wants to merge 2 commits intomainfrom
takis/minor-improvements
Open

chore: Improve loggging#211
Takaros999 wants to merge 2 commits intomainfrom
takis/minor-improvements

Conversation

@Takaros999
Copy link
Copy Markdown
Contributor

This PR:

  1. Improves logging for unrecognised bridge responses
  2. Defaults to World ID 4.0 in the nextjs example

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

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

Project Deployment Actions Updated (UTC)
idkit-js-example Ready Ready Preview, Comment Apr 8, 2026 0:37am

Request Review

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: e2da5136af

ℹ️ 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 on lines +640 to +644
serde_json::from_slice(&plaintext).map_err(|_| {
let raw = String::from_utf8_lossy(&plaintext);
Error::BridgeError(format!(
"World App returned an unrecognized response. This may indicate a version mismatch. Raw response: {raw}"
))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Classify unparseable bridge payloads as unexpected responses

This change maps JSON decode failures to Error::BridgeError, which downstream is treated as AppError::ConnectionFailed and a retryable NetworkingError (to_app_error/is_networking_error). For malformed or version-mismatched decrypted payloads, clients now mis-handle a protocol/format problem as a transport failure, which can trigger unnecessary retry loops and hide the real failure class. Keep the richer message if needed, but return an UnexpectedResponse/JSON-class error instead of BridgeError.

Useful? React with 👍 / 👎.

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