Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Crash/exit Hubble Node process and other scripts/entrypoints on UnhandledPromiseRejections #613

Open
jacque006 opened this issue Jun 23, 2021 · 1 comment
Labels
client This PR is about implementing the client

Comments

@jacque006
Copy link
Collaborator

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 #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.

@jacque006 jacque006 added the client This PR is about implementing the client label Jun 23, 2021
@jacque006
Copy link
Collaborator Author

Consider also crashing the node after n failed ETH provider re-connection attempts, or a duration of failed re-connections https://github.com/thehubbleproject/hubble-contracts/blob/master/ts/client/node.ts#L43-L45

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client This PR is about implementing the client
Projects
None yet
Development

No branches or pull requests

1 participant