From 6a9a7e3b7c0083c02d53f16269b00a3a2e6dd698 Mon Sep 17 00:00:00 2001 From: Mark Wilson Date: Sat, 10 Oct 2015 16:23:21 -0700 Subject: [PATCH] Give more context for NS upload errors --- nightscout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nightscout.js b/nightscout.js index 432e543..5dcc027 100644 --- a/nightscout.js +++ b/nightscout.js @@ -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); }