Make error notification consistent with others; console log error

pull/10616/head
Jared Scheib 2017-06-09 01:02:03 -05:00
parent 12aa43af07
commit 7942cc9411
1 changed files with 4 additions and 2 deletions

View File

@ -23,8 +23,10 @@ export const fetchJSONFeedAsync = url => async dispatch => {
const {data} = await fetchJSONFeedAJAX(url)
dispatch(fetchJSONFeedCompleted(data))
} catch (error) {
console.error(error)
dispatch(fetchJSONFeedFailed())
// TODO: consider error.data.message instead of url in error message
dispatch(errorThrown(error, `Failed to fetch NewsFeed from ${url}`))
dispatch(
errorThrown(error, `Failed to fetch NewsFeed: ${error.data.message}`)
)
}
}