When an unhandled promise rejection occurs in the Hubble Node process (and likely any of our scripts/other entry points), a warning is logged out but does not prevent the process from continuing, such as in https://github.com/thehubbleproject/hubble-contracts/issues/612 . This can lead to suppression of critical bugs/issues.
Solution
Set NodeJS --unhandled-rejections=strict to exit node process when an unhandled promise rejection occurs. We should do this in the Docker image CMD line, and the numerous spots where ts-node is called. Ideally this can be done in package.json, tsconfig.json, or some other config file.
Problem
When an unhandled promise rejection occurs in the Hubble Node process (and likely any of our scripts/other entry points), a warning is logged out but does not prevent the process from continuing, such as in https://github.com/thehubbleproject/hubble-contracts/issues/612 . This can lead to suppression of critical bugs/issues.
Solution
Set NodeJS --unhandled-rejections=strict to exit node process when an unhandled promise rejection occurs. We should do this in the Docker image
CMD
line, and the numerous spots wherets-node
is called. Ideally this can be done inpackage.json
,tsconfig.json
, or some other config file.