Permalink
Browse files

Merge pull request #4 from grobot/master

Handles errors in lib/client this.send
  • Loading branch information...
2 parents 31b78a0 + abc1e55 commit b37344b6ee20d3f1744a43a8683c13b752acbe16 @gmwils committed Jan 8, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/client.js
View
3 lib/client.js
@@ -84,6 +84,7 @@ var methods = function() {
});
req.send(function(err, res) {
+ if(err) return failure_cb(err);
var body = '';
res.on('data', function (chunk) {
body += chunk;
@@ -107,4 +108,4 @@ var methods = function() {
};
};
-methods.call(Client.prototype);
+methods.call(Client.prototype);

0 comments on commit b37344b

Please sign in to comment.