diff --git a/seasoned_api/src/plex/plex.js b/seasoned_api/src/plex/plex.js index ef377fc..9eb1b29 100644 --- a/seasoned_api/src/plex/plex.js +++ b/seasoned_api/src/plex/plex.js @@ -30,6 +30,16 @@ const matchingTitleAndYear = (plex, tmdb) => { }; const successfullResponse = response => { + if (response && response["MediaContainer"]) return response; + + if ( + response == null || + response["status"] == null || + response["statusText"] == null + ) { + throw Error("Unable to decode response"); + } + const { status, statusText } = response; if (status === 200) {