Bug #23709

StatisticsCharts fails handling errors

Added by boaz shust 11 months ago. Updated 9 months ago.

Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:


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`"

statistics_empty.png View statistics_empty.png 31.8 KB no statistics are shown on error boaz shust, 05/27/2018 11:56 AM
console.error.png View console.error.png 49.9 KB console logs messages boaz shust, 05/27/2018 11:56 AM
development.log development.log 14.7 KB foreman logs -- intentionally set to return status 500 boaz shust, 05/27/2018 12:32 PM
Statistics empty Console.error

Related issues

Related to Foreman - Refactor #21962: move away from jquery ajax to axiosClosed2017-12-13

Associated revisions

Revision 7d6d573e (diff)
Added by Boaz Shuster 10 months ago

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 <>


#1 Updated by boaz shust 11 months ago

  • Subject changed from StatisticsCharts fails handle errors to StatisticsCharts fails handling errors

#2 Updated by Ohad Levy 11 months ago

can you also get the error from rails ?

#3 Updated by The Foreman Bot 11 months ago

  • Status changed from New to Ready For Testing
  • Pull request added

#5 Updated by Ohad Levy 10 months ago

#7 Updated by Ohad Levy 10 months ago

  • Legacy Backlogs Release (now unused) set to 330

#8 Updated by The Foreman Bot 10 months ago

  • Pull request added

#9 Updated by Anonymous 10 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF