We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33f55f6 commit db8a1b5Copy full SHA for db8a1b5
src/api/apis/OMDbAPI.ts
@@ -40,7 +40,11 @@ export class OMDbAPI extends APIModel {
40
const data = await fetchData.json();
41
42
if (data.Response === 'False') {
43
- throw Error(`MDB | Received error from ${this.apiName}: ${data.Error}`);
+ if (data.Error === 'Movie not found!') {
44
+ return [];
45
+ }
46
+
47
+ throw Error(`MDB | Received error from ${this.apiName}: \n${JSON.stringify(data, undefined, 4)}`);
48
}
49
if (!data.Search) {
50
return [];
0 commit comments