Skip to content

Add a .catch() for the dangling promises #274

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

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

igalshilman
Copy link
Contributor

In Node, a rejected promises without a .catch() causes the process to exit. We have few places in our API that create promises internally but do not expose them back to the caller. For example: ctx.set(), ctx.reject/resolve awakable, etc'. These promises might get rejected, due to for example non determinism errors.
This PR adds a .catch() call, that forwards the failure back to the FSM.

In Node, a rejected promises without a .catch() causes
the process to exit. We have few places in our API that create
promises internally but do not expose them back to the caller.
For example: ctx.set(), ctx.reject/resolve awakable, etc'.
These promises might get rejected, due to for example non determinism
errors.
This commit adds a .catch() call, that forwards the failure back to the
FSM.
@igalshilman igalshilman merged commit 7dec2bd into restatedev:main Mar 9, 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.

1 participant