Skip to content

fix(security): prevent Sentry errors for Android passkey cancellations - #2582

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

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

Conversation

@sentry

@sentry sentry Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

On Android, when a user cancels the passkey prompt, the Turnkey SDK throws a plain object {error: 'UserCancelled', message: 'The user cancelled the request.'}. The existing isCancelled check in handleUnlock (in app/(protected)/(tabs)/settings/security.tsx) only recognized Error instances with name === 'NotAllowedError' (typical for browser/iOS cancellations).

This discrepancy caused Android user cancellations to bypass the intended isCancelled logic and fall into the generic error handling, leading to Sentry.captureException being called for deliberate, non-exceptional user actions. This generated unnecessary noise in Sentry.

This fix extends the isCancelled check to also identify the Turnkey Android-specific cancellation object, ensuring that user-initiated cancellations on Android are correctly handled and do not trigger Sentry error reports.

Fixes SOLID-MK

@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 24, 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 24, 2026 10:34pm UTC
solid-app-staging Ignored Ignored Preview Sep 24, 2026 10:34pm 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