Skip to content

Commit 87613fa

Browse files
authored
Merge pull request #542 from highcharts/cleanup/moving-avg-message
cleanup/moving-avg-message
2 parents bc64dd4 + 2b220f4 commit 87613fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/server/routes/health.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ export default function addHealthRoutes(app) {
100100
// Moving average
101101
period,
102102
movingAverage,
103-
message: `Last ${period} minutes had a success rate of ${movingAverage.toFixed(2)}%.`,
103+
message:
104+
isNaN(movingAverage) || !successRates.length
105+
? 'Too early to report. No exports made yet. Please check back soon.'
106+
: `Last ${period} minutes had a success rate of ${movingAverage.toFixed(2)}%.`,
104107

105108
// SVG/JSON attempts
106109
svgExportAttempts: stats.exportFromSvgAttempts,

0 commit comments

Comments
 (0)