StatisticsCharts fails handling errors
I just noticed that when one of the statistics chart returns 500 the entire statistics list not displayed.
The error messages I get in the console logs are:
"Failed prop type: The prop `id` is marked as required in `ChartBox`, but its value is `undefined`"
"Failed prop type: Invalid prop `errorText` of type `object` supplied to `ChartBox`, expected `string`"
Fixes #23709 - Fix ajaxRequestAction failure dispatch
The FAILURE action dispatched in ajaxRequestAction is not
aligned with the bookmarks, powerStatus and statistics
- Moving to axios returns Error object instead of a string
- The payload doesn't contain "id" but "item"
This patch fixes that problem and makes components work
on failures from API.
In addition, tests were added and fixed to avoid regressions.
Signed-off-by: Boaz Shuster <email@example.com>