In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
My pipeline passed when it should have failed and deployed a version that is crashing on launch. If Node.js would have exited with a non-zero exit code, the pipeline would have failed and the bad version wouldn't have been deployed.
Is there a way to make Node.js exit with a non-zero exit code when it encounters an unhandled promise rejection, that doesn't require me to wait for the future?
For node
12 and later:
node --unhandled-rejections=strict