Skip to content

Commit

Permalink
Give more context for NS upload errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mddub committed Oct 10, 2015
1 parent 386a9de commit 6a9a7e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nightscout.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ var upload = module.exports.upload = function(entries, endpoint, secret, callbac
if(err) {
throw new Error("Error uploading to Nightscout: can't connect to Nightscout host");
} else if(response.statusCode !== 200) {
throw new Error("Error uploading to Nightscout: " + JSON.stringify(response.body));
throw new Error("Error uploading to Nightscout: " + JSON.stringify(response));
} else {
callback(response);
}
Expand Down

0 comments on commit 6a9a7e3

Please sign in to comment.