Skip to content
Browse files

handle undefined body from request.

  • Loading branch information...
1 parent 1ed8237 commit af1db33413f2f533bd69c5dd4bcde7b151afbd28 @chjj committed Feb 11, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/charged.js
View
4 lib/charged.js
@@ -910,6 +910,10 @@ Charged.prototype.request = function(options, callback) {
+ ' Chargify may be having a problem.'));
}
+ if (!body) {
+ return callback(new Error('No body.'));
+ }
+
if (body.errors) {
return callback(new Error(body.errors.join('\n')));
}

0 comments on commit af1db33

Please sign in to comment.
Something went wrong with that request. Please try again.