From 7942cc941133773352abedb3f3b7c7a856a0be78 Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Fri, 9 Jun 2017 01:02:03 -0500 Subject: [PATCH] Make error notification consistent with others; console log error --- ui/src/status/actions/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/status/actions/index.js b/ui/src/status/actions/index.js index 051627dbd4..6f1ae78ab2 100644 --- a/ui/src/status/actions/index.js +++ b/ui/src/status/actions/index.js @@ -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}`) + ) } }