handle language fetch failure

This commit is contained in:
Sean Yesmunt 2020-06-18 11:41:37 -04:00
parent 7f6c5c544e
commit a4a80ee2f6
2 changed files with 6 additions and 0 deletions

View file

@ -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';

View file

@ -182,6 +182,11 @@ export function doFetchLanguage(language) {
language,
},
});
})
.catch(e => {
dispatch({
type: LOCAL_ACTIONS.DOWNLOAD_LANGUAGE_FAILURE,
});
});
}
};