Skip to content

Commit 5a8b307

Browse files
committed
Merge branch 'master' into release
2 parents a66d6c3 + db8a1b5 commit 5a8b307

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/apis/OMDbAPI.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ export class OMDbAPI extends APIModel {
4040
const data = await fetchData.json();
4141

4242
if (data.Response === 'False') {
43-
throw Error(`MDB | Received error from ${this.apiName}: ${data.Error}`);
43+
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)}`);
4448
}
4549
if (!data.Search) {
4650
return [];

0 commit comments

Comments
 (0)