UnhandledPromiseRejectionWarning
See original GitHub issueCommands which fail:
cfcli -a -t A add anything 1.2.3.4
cfcli ls
Background:
The below happens on Windows if I don’t have the environment variables set.
It happens on Linux (within docker image node:10
) even if I do.
Exception:
(node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined
at /usr/local/lib/node_modules/cloudflare-cli/index.js:170:52
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
(node:17) 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(). (rejection id: 3)
(node:17) [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.
Continuing to investigate my side…
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Getting a UnhandledPromiseRejectionWarning when testing ...
On the console I'm getting an 'UnhandledPromiseRejectionWarning' even though the reject function is getting called since it instantly shows the message ...
Read more >What is UnhandledPromiseRejectionWarning
The Promise.reject() method returns a Promise object that is rejected with a given reason. The unhandledrejection event is sent to the global scope...
Read more >Fixing UnhandledPromiseRejectionWarning in Node.js
If we fail to handle a Promise rejection, we're shown the UnhandledPromiseRejectionWarning by Node.js. const slowAndSteady = new Promise( ...
Read more >Unhandled Promise Rejections in Node.js - The Code Barbarian
If you want to suppress the unhandled promise rejection warning, all you need to do is call .catch() on the promise with an...
Read more >A fix to the Unhandled Promise Rejection Warning - Medium
The issue is that the promise rejection was not handled. Here is what the error usually looks like. (node:7741) UnhandledPromiseRejectionWarning ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the bug report Kieren. I have published a new version 3.1.1 with improved error handling, so you should get a more useful error message when you run the command
I’m going close this issue, as there isn’t much I can do without more info. Please reopen if you have more info