Skip to content

fix: preserve native user and configuration error codes - #113

Open
OskarEichler wants to merge 1 commit into
f-23:stablefrom
OskarEichler:codex/native-error-mapping
Open

fix: preserve native user and configuration error codes#113
OskarEichler wants to merge 1 commit into
f-23:stablefrom
OskarEichler:codex/native-error-mapping

Conversation

@OskarEichler

Copy link
Copy Markdown

Fixes

  • Map iOS InvalidUser and InvalidUserId to the existing InvalidUserId error.
  • Map Android NotConfigured to the existing BadConfiguration error.
  • Handle null/undefined rejection values with UnknownError instead of throwing a secondary TypeError.

Preserve detailed native messages and the existing error object shape. Consumers now receive the intended stable categories instead of generic Native error for these known codes; this observable correction is intentional.

Verification

Inline before/after checks reproduce both nullish TypeErrors and the three generic-code fallthroughs; all now map correctly. Baseline and combined fixes pass all 30 existing tests, TypeScript, full lint and CommonJS/ESM/declaration builds. No tests changed; no live authentication requests.

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.

1 participant