Skip to content
Browse files

Merge pull request #22 from 2sidedfigure/devel/more-robust-error-object

Pass a more robust error object to the callback
  • Loading branch information...
2 parents 3e25088 + 1ca9389 commit 000d959d78a559caa9f0f0c097a8de1d9dfbbd02 @abh abh committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/main.js
View
3 lib/main.js
@@ -27,7 +27,8 @@ function setup_response_handler(req, callback) {
err = 1;
response = { error : { message : "Invalid JSON from stripe.com" } };
}
- callback(err, response)
+ err && (err = { statusCode: err, response: response });
+ callback(err, response);
});
});
}

0 comments on commit 000d959

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