Skip to content

Fix: Log Turnkey passkey cancellations as warnings - #2528

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/log-turnkey-passkey-cancellations-as-warnings
Open

sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/log-turnkey-passkey-cancellations-as-warnings

Conversation

@sentry

@sentry sentry Bot commented Sep 18, 2026

Copy link
Copy Markdown

Previously, login cancellations initiated by users during a Turnkey passkey flow were being incorrectly logged as errors in Sentry, rather than warnings.

The root cause was an incomplete error handling check in hooks/useUser.ts at line 434. The code only checked for error?.name === 'NotAllowedError' to identify user cancellations. However, Turnkey-wrapped passkey cancellations present with a different error structure: error.error === 'UserCancelled' and error.message === 'The user cancelled the request.'. This discrepancy caused these benign user actions to be captured as exceptions, cluttering error logs.

This fix addresses the issue by replacing the narrow error?.name === 'NotAllowedError' check with the more comprehensive isPasskeyPromptError(error) utility. This utility, already imported and used in other parts of the codebase, correctly identifies various passkey prompt errors, including the specific Turnkey cancellation pattern.

A regression test case has been added to lib/utils/__tests__/passkey-credentials.test.ts to ensure the Turnkey cancellation error shape is correctly identified by isPasskeyPromptError.

Fixes SOLID-10X

@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.

@vercel

vercel Bot commented Sep 18, 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 18, 2026 10:38am UTC
solid-app-staging Ignored Ignored Preview Sep 18, 2026 10:38am UTC

Request Review

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