Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/node: Typed errors #1858

Merged
merged 10 commits into from
Jan 26, 2024
Merged

Conversation

kwek20
Copy link
Contributor

@kwek20 kwek20 commented Jan 19, 2024

Description of change

Adds error types which match the rust errors to nodejs

OPEN QUESTIONS:

  • Do we make all rust errors impl the serialized type/error struct?
  • Anyone has a better idea for the serialization of self? currently it calls serialize on inner enum type(match), then needs to deserialize in order to be properly serialized in the serialize_entry call. (otherwise all fields are double string escaped and dont parse properly on js side) ->bindings/core/src/error.rs

Links to any relevant issues

Fixes #1417

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How the change has been tested

caught the new errors by their instance

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@kwek20 kwek20 linked an issue Jan 19, 2024 that may be closed by this pull request
@kwek20 kwek20 changed the title Feaet/node: Typed errors Feat/node: Typed errors Jan 19, 2024
@kwek20
Copy link
Contributor Author

kwek20 commented Jan 19, 2024

@marc2332
How do you feel about these errors? Im not sure what the standards are

@marc2332
Copy link
Contributor

@marc2332 How do you feel about these errors? Im not sure what the standards are

Looks very promising, I'll give it a try asap!

DaughterOfMars
DaughterOfMars previously approved these changes Jan 22, 2024
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.

feature: Typed errors in NodeJS bindings
6 participants