Project

General

Profile

Bug #23709

StatisticsCharts fails handling errors

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

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 8 months ago

Fixes #23709 - Fix ajaxRequestAction failure dispatch

The FAILURE action dispatched in ajaxRequestAction is not
aligned with the bookmarks, powerStatus and statistics
reducers:
- 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 <>

History

#1 Updated by boaz shust 9 months ago

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

#2 Updated by Ohad Levy 9 months ago

can you also get the error from rails ?

#3 Updated by The Foreman Bot 9 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5616 added

#5 Updated by Ohad Levy 8 months ago

#7 Updated by Ohad Levy 8 months ago

  • Legacy Backlogs Release (now unused) set to 330

#8 Updated by The Foreman Bot 8 months ago

  • Pull request https://github.com/theforeman/foreman/pull/5711 added

#9 Updated by Anonymous 8 months ago

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

Also available in: Atom PDF