Skip to content

fix(withdraw): ignore user-cancelled passkey signing errors - #2542

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/withdraw-sentry-passkey-cancel
Open

sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/withdraw-sentry-passkey-cancel

Conversation

@sentry

@sentry sentry Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses an issue where Sentry was logging TurnkeyActivityError: Failed to sign: The user cancelled the request. when users dismissed the passkey/Turnkey prompt during the EIP-712 signing step in the useWithdrawRainCollateral hook.

Root Cause:
The smartAccountClient.account.signTypedData call (Step 4) occurs before executeTransactions (Step 5). When a user cancelled the passkey prompt during this signing step, the error bypassed the isWebAuthnUserCancelledError guard, which was only present within executeTransactions. Consequently, Sentry.captureException was called unconditionally, leading to unnecessary error reports.

Changes Made:

  1. Import isWebAuthnUserCancelledError: Added isWebAuthnUserCancelledError to the import statement from @/lib/execute in hooks/useWithdrawRainCollateral.ts.
  2. Guard Sentry Capture: Implemented a check in the catch block of useWithdrawRainCollateral.ts to detect user-cancelled WebAuthn errors. If isWebAuthnUserCancelledError(err) returns true, Sentry capture is skipped, and the hook's status is set to Status.IDLE (instead of Status.ERROR), treating it as a user-initiated cancellation rather than an application error.
  3. Added Unit Tests: Created hooks/__tests__/useWithdrawRainCollateral.test.tsx with tests to ensure Sentry is not called for user cancellations and is called for other types of errors during the signing process.

This change reduces Sentry noise and accurately reflects user intent when cancelling a passkey prompt.

Fixes SOLID-W5

@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 21, 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 21, 2026 10:35am UTC
solid-app-staging Ignored Ignored Preview Sep 21, 2026 10:35am 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