Removes data clearance if error
This allows for the UI to stay stable instead of going away.
If the backend comes back, then the polling will reattached without
signaling the user. If the user navigates, the error text will be
shown.
@@ -74,11 +74,9 @@ export default class Overview extends Component<OverviewProps, OverviewState> {
this.props.setIsLoading(false)
})
- // if EventSource error clear close
this.source.addEventListener('error', () => {
- this.setState({ data: null })
this.props.setIsLoading(false)
- this.props.setError(true)
+ this.props.setError(true, 'Looks like the backend source has gone away. Retrying...')
})
}
