Skip to content

Commit

Permalink
Merge pull request Azure#212 from igorklopov/master
Browse files Browse the repository at this point in the history
Callback requires return
  • Loading branch information
kirankumarkolli authored Oct 18, 2017
2 parents 26bfcbc + 2ed62b5 commit 03e8376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function createRequestObject(connectionPolicy, requestOptions, callback){
response.on("end", function() {
if (response.statusCode >= 400) {
return callback(getErrorBody(response, data), undefined, response.headers);
}
}

var result;
try {
Expand Down Expand Up @@ -174,7 +174,7 @@ var RequestHandler = {
} else if (typeof body === "string") {
buffer = new Buffer(body, "utf8");
} else {
callback({ message: "body must be string, Buffer, or stream" });
return callback({ message: "body must be string, Buffer, or stream" });
}
}

Expand Down

0 comments on commit 03e8376

Please sign in to comment.