Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/better-errors #367

Merged
merged 11 commits into from
Mar 16, 2023
Merged

feat/better-errors #367

merged 11 commits into from
Mar 16, 2023

Conversation

MasterKale
Copy link
Owner

This PR augments identified errors raised during calls to startRegistration() and startAuthentication() with the following:

  • Original errors are available as the MDN-official cause property
  • Distinct, constant error codes are available as a new code property with the following possible values:
    • 'ERROR_CEREMONY_ABORTED'
    • 'ERROR_INVALID_DOMAIN'
    • 'ERROR_INVALID_RP_ID'
    • 'ERROR_INVALID_USER_ID_LENGTH'
    • 'ERROR_MALFORMED_PUBKEYCREDPARAMS'
    • 'ERROR_AUTHENTICATOR_GENERAL_ERROR'
    • 'ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT'
    • 'ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT'
    • 'ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED'
    • 'ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG'
    • 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY'

Fixes #357

@MasterKale MasterKale added this to the v7.2.0 milestone Mar 1, 2023
@MasterKale MasterKale added the package:browser @simplewebauthn/browser label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:browser @simplewebauthn/browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error type identification in the browser
2 participants