Skip to content

Commit

Permalink
Improve error message on Autotune run without BG-data (#1404)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
petervanrijt committed Jul 22, 2021
1 parent bec71ed commit 839a250
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/oref0-autotune-prep.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ if (!module.parent) {
var glucose_data = JSON.parse(fs.readFileSync(glucose_input, 'utf8'));
} catch (e) {
console.error("Warning: could not parse "+glucose_input);
return console.error("Warning: could not parse "+glucose_input", e);
}

var carb_data = { };
Expand Down
2 changes: 1 addition & 1 deletion bin/oref0-autotune.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ do
cp profile.pump.json profile.json
exit
else
die "Could not run oref0-autotune-core autotune.$i.json profile.json profile.pump.json"
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 ."
fi
else
# Copy tuned profile produced by autotune to profile.json for use with next day of data
Expand Down

0 comments on commit 839a250

Please sign in to comment.