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

Unhandled Exceptions Crash Prod and Needs Manual Restart #61

Open
UpsidePotential opened this issue Sep 1, 2020 · 1 comment
Open

Comments

@UpsidePotential
Copy link
Collaborator

DiscordJS can hang and throw exceptions. Maybe just make a root level exception handler so the server doesnt go down.

2020-09-01T19:58:34.505213+00:00 app[worker.1]: App Listening
2020-09-01T20:03:34.480033+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Error: Something took too long to do.
2020-09-01T20:03:34.480051+00:00 app[worker.1]: at /app/node_modules/discord.js/src/client/ClientManager.js:40:57
2020-09-01T20:03:34.480052+00:00 app[worker.1]: at Timeout._onTimeout (/app/node_modules/discord.js/src/client/Client.js:436:7)
2020-09-01T20:03:34.480054+00:00 app[worker.1]: at listOnTimeout (internal/timers.js:549:17)
2020-09-01T20:03:34.480054+00:00 app[worker.1]: at processTimers (internal/timers.js:492:7)
2020-09-01T20:03:34.480219+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 21)
2020-09-01T20:03:34.480308+00:00 app[worker.1]: (node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2020-09-01T21:45:28.185453+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=slickybot.herokuapp.com request_id=d3dcc134-7e61-42ad-8b5e-7f711cfdc039 fwd="173.53.4.190" dyno= connect= service= status=503 bytes= protocol=https
2020-09-01T21:45:28.808147+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=slickybot.herokuapp.com request_id=8abdbffc-f851-4a5d-a6dc-e7892ab61e5d fwd="173.53.4.190" dyno= connect= service= status=503 bytes= protocol=https

@UpsidePotential UpsidePotential added this to the asdf milestone Sep 1, 2020
@UpsidePotential
Copy link
Collaborator Author

Added a global catch all. Should add code to post the exception to judgement day practice when it occurs

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

No branches or pull requests

1 participant