danielpigott / cloudflare-cli

CLI for interacting with Cloudflare
MIT License
212 stars 42 forks source link

Error with node v12.1.0 #48

Closed kevinrook closed 5 years ago

kevinrook commented 5 years ago

I've started getting the below errors

(node:14799) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
    at /usr/local/lib/node_modules/cloudflare-cli/index.js:198:83
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
(node:14799) 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: 2)
(node:14799) [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.
danielpigott commented 5 years ago

It looks like this was triggered by a network error (502 or any error that does not include an array of errors in the response). I will update the error handling so it will display a more useful message (can't do much about the 502 itself)

danielpigott commented 5 years ago

I have updated error handling in version 3.2.3