icodeforlove / node-cloudflare

Node.js CloudFlare V4 API wrapper
MIT License
30 stars 14 forks source link

Missing validation results in error #7

Closed ghostnumber7 closed 7 years ago

ghostnumber7 commented 7 years ago

For some reason we got a response without an error and a body, witch led to the following error

TypeError: Cannot read property 'result' of undefined
  at Request._callback (/app/node_modules/cloudflare4/index.js:131:44)

body was undefined here

} else if ($config.required && !body[$config.required]) {