Skip to content

fix: catch data reset errors#15

Merged
chgeo merged 2 commits intocap-js:mainfrom
BobdenOs:fix/reset-error
Mar 14, 2025
Merged

fix: catch data reset errors#15
chgeo merged 2 commits intocap-js:mainfrom
BobdenOs:fix/reset-error

Conversation

@BobdenOs
Copy link
Contributor

Currently when the cds.data.reset functions throws it will never call the done callback. By adding the callback an extra time it is also attached as the catch handler. This prevents jest and mocha from giving random timeout errors. In the case of node --test this will prevent the test from handing indefinitely. Instead the original Error will be provided as failure reason.

@BobdenOs BobdenOs requested a review from chgeo March 14, 2025 09:54
Copy link
Member

@chgeo chgeo left a comment

Choose a reason for hiding this comment

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

Good catch!

@chgeo chgeo enabled auto-merge (squash) March 14, 2025 10:12
@chgeo chgeo merged commit c9e5062 into cap-js:main Mar 14, 2025
3 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