Skip to content

Commit

Permalink
do not suppress the original error message when JSON cannot be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler committed Oct 15, 2015
1 parent ef2a95f commit d679213
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/transports/elasticsearch.js
Expand Up @@ -329,8 +329,8 @@ function scrollResultSet(that, callback) {
try{
body = jsonParser.parse(response.body);
}catch(e){
err = new Error("Cannot Parse: " + response.body);
callback(err, []);
e.message = e.message + " | Cannot Parse: " + response.body;
callback(e, []);
return;
}

Expand Down

0 comments on commit d679213

Please sign in to comment.