Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
Brooooooklyn merged 1 commit intonapi-rs:mainnapi-rs/napi-rs:mainfrom
h-a-n-a:custom-tsfn-result-codeh-a-n-a/napi-rs:custom-tsfn-result-codeCopy head branch name to clipboard
Jun 2, 2025
Merged

feat!(napi): support custom tsfn error status #2672
Brooooooklyn merged 1 commit intonapi-rs:mainnapi-rs/napi-rs:mainfrom
h-a-n-a:custom-tsfn-result-codeh-a-n-a/napi-rs:custom-tsfn-result-codeCopy head branch name to clipboard

Conversation

@h-a-n-a
Copy link
Copy Markdown
Contributor

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

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
63 checks passed
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.