Skip to content

Commit 839a250

Browse files
authored
Improve error message on Autotune run without BG-data (#1404)
* Better error handling for Autotune without BG-data Prevents technical error on the logging which users of Autotune(Web) see. * Improve error message on Autotune without BG-data Informs users on where to start investigation.
1 parent bec71ed commit 839a250

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bin/oref0-autotune-prep.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ if (!module.parent) {
104104
var glucose_data = JSON.parse(fs.readFileSync(glucose_input, 'utf8'));
105105
} catch (e) {
106106
console.error("Warning: could not parse "+glucose_input);
107+
return console.error("Warning: could not parse "+glucose_input", e);
107108
}
108109

109110
var carb_data = { };

bin/oref0-autotune.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ do
248248
cp profile.pump.json profile.json
249249
exit
250250
else
251-
die "Could not run oref0-autotune-core autotune.$i.json profile.json profile.pump.json"
251+
die "Could not run oref0-autotune-core autotune.$i.json profile.json profile.pump.json. Make sure Nightscout contains BG-values for the selected date range, Autotune(Web) does not work without BG-values. See documentation on the how-to check http://nightscout.github.io/nightscout/reports/#day-to-day ."
252252
fi
253253
else
254254
# Copy tuned profile produced by autotune to profile.json for use with next day of data

0 commit comments

Comments
 (0)