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.
2 parents a66d6c3 + db8a1b5 commit 5a8b307Copy full SHA for 5a8b307
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