diff --git a/src/api/apis/OMDbAPI.ts b/src/api/apis/OMDbAPI.ts index 5460c7a..3b7ca30 100644 --- a/src/api/apis/OMDbAPI.ts +++ b/src/api/apis/OMDbAPI.ts @@ -40,7 +40,11 @@ export class OMDbAPI extends APIModel { const data = await fetchData.json(); if (data.Response === 'False') { - throw Error(`MDB | Received error from ${this.apiName}: ${data.Error}`); + if (data.Error === 'Movie not found!') { + return []; + } + + throw Error(`MDB | Received error from ${this.apiName}: \n${JSON.stringify(data, undefined, 4)}`); } if (!data.Search) { return [];