Permalink
Browse files

Added more error information when a stripe error occurs.

  • Loading branch information...
1 parent aaf14d5 commit 9f3c9b6700953589b2c04b1515c214624ca349c8 @BusyRich BusyRich committed Feb 26, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/main.js
View
2 lib/main.js
@@ -25,6 +25,8 @@ function setup_response_handler(req, callback) {
if(200 != res.statusCode) {
err = new Error(response.error.message);
err.name = response.error.type;
+ err.code = response.error.code;
+ err.param = response.error.param;
response = null;
}
}

0 comments on commit 9f3c9b6

Please sign in to comment.