Merge pull request #1812 from influxdata/update/news_feed_errors-1628
Improve error message on JSON Feed GET failpull/1821/head
commit
87a1a19f22
|
@ -7,6 +7,7 @@
|
|||
### UI Improvements
|
||||
1. [#1796](https://github.com/influxdata/chronograf/pull/1796): Add spinner to indicate data is being written
|
||||
1. [#1800](https://github.com/influxdata/chronograf/pull/1800): Embiggen text area for line protocol manual entry in Data Explorer's Write Data overlay
|
||||
1. [#1812](https://github.com/influxdata/chronograf/pull/1812): Improve error message when request for Status Page News Feed fails
|
||||
|
||||
## v1.3.5.0 [2017-07-27]
|
||||
### Bug Fixes
|
||||
|
|
|
@ -7,8 +7,6 @@ import {errorThrown} from 'shared/actions/errors'
|
|||
|
||||
import * as actionTypes from 'src/status/constants/actionTypes'
|
||||
|
||||
import {HTTP_NOT_FOUND} from 'shared/constants'
|
||||
|
||||
const fetchJSONFeedRequested = () => ({
|
||||
type: actionTypes.FETCH_JSON_FEED_REQUESTED,
|
||||
})
|
||||
|
@ -45,15 +43,11 @@ export const fetchJSONFeedAsync = url => async dispatch => {
|
|||
} catch (error) {
|
||||
console.error(error)
|
||||
dispatch(fetchJSONFeedFailed())
|
||||
if (error.status === HTTP_NOT_FOUND) {
|
||||
dispatch(
|
||||
errorThrown(
|
||||
error,
|
||||
`Failed to fetch News Feed. JSON Feed at '${url}' returned 404 (Not Found)`
|
||||
)
|
||||
dispatch(
|
||||
errorThrown(
|
||||
error,
|
||||
`Failed to fetch JSON Feed for News Feed from '${url}'`
|
||||
)
|
||||
} else {
|
||||
dispatch(errorThrown(error, 'Failed to fetch NewsFeed'))
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue