Skip to content

Commit

Permalink
Don't include the confusing "TypeError" in toaster messages when fetc…
Browse files Browse the repository at this point in the history
…hing measurements fails.

Fixes #9576.
  • Loading branch information
fniessink committed Oct 23, 2024
1 parent 03705df commit 460c848
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/frontend/src/PageContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function PageContent({
minDate.setHours(minDate.getHours() - 1) // Get at least one hour of measurements
get_measurements(minDate, maxDate)
.then((json) => setMeasurements(json.measurements ?? []))
.catch((error) => showMessage("error", "Could not fetch measurements", `${error}`))
.catch((error) => showMessage("error", "Could not fetch measurements", `${error.message}`))
}, [report_date, nrMeasurements, settings.dateInterval.value, settings.nrDates.value])
let content
if (loading) {
Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/metric/MetricDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function fetchMeasurements(reportDate, metric_uuid, setMeasurements, setMeasurem
return null
})
.catch((error) => {
showMessage("error", "Could not fetch measurements", `${error}`)
showMessage("error", "Could not fetch measurements", `${error.message}`)
setMeasurementsStatus("failed")
})
}
Expand Down
1 change: 1 addition & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ If your currently installed *Quality-time* version is not v5.17.0, please first

### Fixed

- Don't include the confusing "TypeError" in toaster messages when fetching measurements fails. Fixes [#9576](https://github.com/ICTU/quality-time/issues/9576).
- Correctly sort metrics in the "Add metric" dropdown menu. Fixes [#9857](https://github.com/ICTU/quality-time/issues/9857).
- The warning message shown for unsupported measurement details was incorrect for metrics with a version scale. Fixes [#9973](https://github.com/ICTU/quality-time/issues/9973).
- The metric summary cards with pie chart wouldn't erase the center label when rerendering, causing the label to be visible multiple times. Fixes [#10098](https://github.com/ICTU/quality-time/issues/10098).
Expand Down

0 comments on commit 460c848

Please sign in to comment.