Skip to content

fix(execute): misclassify Turnkey API errors as user cancellations - #2587

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/misclassified-turnkey-errors
Open

sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/misclassified-turnkey-errors

Conversation

@sentry

@sentry sentry Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses issue SOLID-D5, where actual Turnkey API failures were being misclassified as Error: User cancelled transaction.

Problem:
The isWebAuthnUserCancelledError function in lib/execute.ts contained an overly broad check (message.includes('failed to sign')). This caused legitimate Turnkey API errors, such as "Failed to sign: Turnkey error 3: activity timestamp is not current", to be incorrectly identified as user-initiated passkey cancellations. As a result, the application would report a generic "User cancelled transaction" error, obscuring the true underlying API failure from both users and Sentry.

Solution:

  1. Removed isWebAuthnUserCancelledError: The problematic isWebAuthnUserCancelledError function was removed from lib/execute.ts.
  2. Utilized isPasskeyPromptError: The existing and more precise isPasskeyPromptError function from lib/utils/passkey.ts is now used in lib/execute.ts (for transaction execution error handling) and hooks/useWirexThreeDs.ts (for 3DS flow error handling). This function correctly distinguishes between user cancellations and actual API errors.
  3. Added Regression Tests: New test cases were added to lib/utils/__tests__/passkey-credentials.test.ts to specifically assert that isPasskeyPromptError returns false for Turnkey API error messages, ensuring the fix holds.

This change ensures that real API failures are no longer silently swallowed and are reported accurately.

Fixes SOLID-D5

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Preview Sep 25, 2026 10:38am UTC
solid-app-staging Ignored Ignored Preview Sep 25, 2026 10:38am UTC

Request Review

This branch has not been deployed

No deployments
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.

0 participants