Skip to content

fix: make native error of type Error instead of Object - #1165

Merged
chmjkb merged 1 commit into
mainfrom
@chmjkb/fix-native-error-type
May 21, 2026
Merged

chmjkb merged 1 commit into
mainfrom
@chmjkb/fix-native-error-type

Conversation

@chmjkb

@chmjkb chmjkb commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes #1150

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

Check if the faulty example of CoreML multilingual embedding model displays proper error message, also verity that error.code and error.message are present. Make sure that e instanceof Error is true.

Screenshots

Related issues

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@chmjkb
chmjkb requested a review from msluszniak May 21, 2026 09:29

@msluszniak msluszniak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested on this coreml failing model and now the error has shown clearly.

@chmjkb
chmjkb merged commit 1864a14 into main May 21, 2026
4 checks passed
@chmjkb
chmjkb deleted the @chmjkb/fix-native-error-type branch May 21, 2026 09:58
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.

Native errors thrown via JSI stringify as [object Object]

2 participants