diff --git a/ui/redux/actions/livestream.js b/ui/redux/actions/livestream.js index 7c43bf220..d30caad48 100644 --- a/ui/redux/actions/livestream.js +++ b/ui/redux/actions/livestream.js @@ -57,9 +57,13 @@ const fetchLiveChannels = async () => { const fetchLiveChannel = async (channelId: string) => { const response = await fetch(`${LIVESTREAM_LIVE_API}/${channelId}`); - const json = await response.json(); - if (!(json.data && json.data.live)) throw new Error(); - return transformLivestreamData([json.data]); + try { + const json = await response.json(); + if (!(json.data && json.data.live)) throw new Error(); + return transformLivestreamData([json.data]); + } catch { + throw new Error('Error handling live API response'); + } }; const filterUpcomingLiveStreamClaims = (upcomingClaims) => { @@ -176,6 +180,7 @@ export const doFetchActiveLivestream = (channelId: string) => { }, }); } catch (err) { + if (err.message === 'Error handling live API response') return; dispatch({ type: ACTIONS.FETCH_ACTIVE_LIVESTREAM_FAILED, data: { channelId } }); } };