@stellar-passkey/core API / mapCreateError
Function: mapCreateError()
mapCreateError(
error):KitError
Defined in: packages/core/src/webauthn/createOptions.ts:115
Translate a raw error from navigator.credentials.create() into a stable KitError. The error code surface lets callers branch without inspecting brittle DOMException.message strings.
Mapping: NotSupportedError → ES256_NOT_SUPPORTED (authenticator advertises only RS256) NotAllowedError → USER_CANCELLED (user cancel / no authenticator) AbortError → USER_CANCELLED (signal aborted) SecurityError → RP_ID_MISMATCH (rpId / origin mismatch reported by browser)
→ UNSUPPORTED_AUTHENTICATOR (preserves original via cause)
Parameters
error
unknown