Skip to content

fix(passkey): remove unreachable return after throw - #46

Merged
ExorTek merged 1 commit into
masterfrom
fix/passkey-unreachable-return
Aug 6, 2026
Merged

fix(passkey): remove unreachable return after throw#46
ExorTek merged 1 commit into
masterfrom
fix/passkey-unreachable-return

Conversation

@ExorTek

@ExorTek ExorTek commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Resolves the two open CodeQL js/unreachable-statement alerts (#69, #70).

Both are a dead return null; immediately after throw new PasskeyError(...) inside an x5c.map() catch block (mds.js, attestation/androidSafetynet.js). The statement was always unreachable; it only became provable to CodeQL after the recent error-typing pass replaced the never-returning throwXxx() factories with an explicit throw.

Pure dead-code removal — no behaviour change, no public surface change, no changeset. passkey suite green (309).

CodeQL js/unreachable-statement (mds.js, attestation/androidSafetynet.js): the
`return null` after `throw new PasskeyError(...)` inside the x5c .map()
callbacks is dead code. It was invisible before the error-typing pass (the old
throwXxx() factory call wasn't seen as `never`); the explicit throw makes the
dead statement provable. Pure cleanup — no behaviour change, so no changeset.
Copilot AI lite review requested due to automatic review settings August 6, 2026 23:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ExorTek
ExorTek merged commit 22d4340 into master Aug 6, 2026
@ExorTek
ExorTek deleted the fix/passkey-unreachable-return branch August 6, 2026 23:30
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