Promises Debugger
A tool to give meaningful stacktraces for unhandled promise rejections
Usage
Install the dependency
npm i promises-debugger
Require it in your main javascript file
dimNodeModules: true dimInternalModules: false dimNotInProjectRoot: true removeInternalModules: true
Without promises-debugger
UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:443 at TCPConnectWrap.afterConnect [as oncomplete] UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async [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.
With promises-debugger
------------------------------------------------- promises-debugger caught an unhandled rejection-------------------------------------------------Error: connect ECONNREFUSED 127.0.0.1:443 at Axios.request at Axios.<computed> [as post] at Function.wrap [as post] at sayHello at main Error at main at Object.<anonymous> -------------------------------------------