Permalink
Browse files

minor refactor.

  • Loading branch information...
1 parent 9f9adfa commit 16c3b9da0d1361ca816e77129de0eb9c1440e412 @chjj committed Oct 21, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/charged.js
View
@@ -821,11 +821,11 @@ Charged.prototype.request = function(options, callback) {
} catch (e) {
// For debugging:
// e.message += '\nJSON: "' + body + '"';
- e.message += '\n'
- + 'The JSON returned from chargify'
+ // return callback(e);
+ return callback(new Error(
+ 'The JSON returned from chargify'
+ ' is failing to parse.'
- + ' Chargify may be having a problem.';
- return callback(e);
+ + ' Chargify may be having a problem.'));
}
if (body.errors) {

0 comments on commit 16c3b9d

Please sign in to comment.