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

Better way to fail for unhandled rejections #131

Open
Maxim-Mazurok opened this issue Apr 10, 2020 · 0 comments
Open

Better way to fail for unhandled rejections #131

Maxim-Mazurok opened this issue Apr 10, 2020 · 0 comments
Labels
enhancement New feature or request investigation Needs to be investigated

Comments

@Maxim-Mazurok
Copy link
Owner

Currently we have

process.on('unhandledRejection', reason => {
  throw reason;
});

in order to quit node process with error code on unhandled rejected promises.
Which might not be the best way to do it.
First of all, we have many scripts where we need this and code duplication is not a good thing, at least we should make it includable.

Also, we might want to use --unhandled-rejections=strict option for node instead. But first we have to verify that ts-node supports it, and then add it to package.json scripts, probably.

@Maxim-Mazurok Maxim-Mazurok added the enhancement New feature or request label Apr 10, 2020
@Maxim-Mazurok Maxim-Mazurok added the investigation Needs to be investigated label Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request investigation Needs to be investigated
Projects
None yet
Development

No branches or pull requests

1 participant