diff --git a/src/requests/getMatchPlaylists.tsx b/src/requests/getMatchPlaylists.tsx index e2c01cdd..2c13bd00 100644 --- a/src/requests/getMatchPlaylists.tsx +++ b/src/requests/getMatchPlaylists.tsx @@ -91,18 +91,31 @@ export const getMatchPlaylists = async ({ }, } - const playlist: Response = await callApi({ - config, - url: `${DATA_URL}/${getSportLexic(sportType)}`, - }) - const full_game: PlaylistWithDuration = { data: [], dur: fullMatchDuration, } - if (playlist.data) { - return { ...playlist.data, full_game } + try { + const playlist: Response = await callApi({ + config, + url: `${DATA_URL}/${getSportLexic(sportType)}`, + }) + if (playlist.data) { + return { ...playlist.data, full_game } + } + } catch { + return { + ball_in_play: {}, + full_game, + goals: {}, + highlights: {}, + lexics: {}, + players1: [], + players2: [], + score1: 0, + score2: 0, + } } return {