Skip to content

feat!(napi): support custom tsfn error status - #2672

Merged
Brooooooklyn merged 1 commit into
napi-rs:mainfrom
h-a-n-a:custom-tsfn-result-code
Jun 2, 2025
Merged

feat!(napi): support custom tsfn error status #2672
Brooooooklyn merged 1 commit into
napi-rs:mainfrom
h-a-n-a:custom-tsfn-result-code

Conversation

@h-a-n-a

@h-a-n-a h-a-n-a commented May 30, 2025

Copy link
Copy Markdown
Contributor

Support passing custom error status to TSFN so we can receive custom error codes from the JavaScript side.

The only constraint it has is to convert from napi::Status to your custom status. This is required to allow some of the methods that still uses default Error to work with custom error status.

ErrorStatus: From<napi::Status>

@Brooooooklyn Brooooooklyn changed the title feat(napi): support custom tsfn error status feat!(napi): support custom tsfn error status Jun 2, 2025
@Brooooooklyn
Brooooooklyn merged commit f4731bb into napi-rs:main Jun 2, 2025
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