Skip to content

Instantly share code, notes, and snippets.

@agirorn
Last active February 1, 2021 21:24
Show Gist options
  • Save agirorn/2bfc0deb82ad6677e2a85a0cf19b49c8 to your computer and use it in GitHub Desktop.
Save agirorn/2bfc0deb82ad6677e2a85a0cf19b49c8 to your computer and use it in GitHub Desktop.
Unhandled promise rejection warning with a stack trace
/*
* You can also just do "node --trace-warnings app.js"
*/
process.on('unhandledRejection', (rejection) => {
console.log('Unhandled promise rejection warning:');
console.log(rejection);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment