From a4a80ee2f60b6c7c65da660c0acbd7db6effbdfc Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 18 Jun 2020 11:41:37 -0400 Subject: [PATCH] handle language fetch failure --- ui/constants/action_types.js | 1 + ui/redux/actions/settings.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ui/constants/action_types.js b/ui/constants/action_types.js index 5092c4bd2..aae2b98aa 100644 --- a/ui/constants/action_types.js +++ b/ui/constants/action_types.js @@ -186,6 +186,7 @@ export const FETCH_REWARD_CONTENT_COMPLETED = 'FETCH_REWARD_CONTENT_COMPLETED'; // Language export const DOWNLOAD_LANGUAGE_SUCCESS = 'DOWNLOAD_LANGUAGE_SUCCESS'; +export const DOWNLOAD_LANGUAGE_FAILURE = 'DOWNLOAD_LANGUAGE_FAILURE'; // Subscriptions export const CHANNEL_SUBSCRIBE = 'CHANNEL_SUBSCRIBE'; diff --git a/ui/redux/actions/settings.js b/ui/redux/actions/settings.js index 78931d0f4..80ba341e8 100644 --- a/ui/redux/actions/settings.js +++ b/ui/redux/actions/settings.js @@ -182,6 +182,11 @@ export function doFetchLanguage(language) { language, }, }); + }) + .catch(e => { + dispatch({ + type: LOCAL_ACTIONS.DOWNLOAD_LANGUAGE_FAILURE, + }); }); } };