Merge branch 'master' into release
This commit is contained in:
commit
5a8b3078da
1 changed files with 5 additions and 1 deletions
|
|
@ -40,7 +40,11 @@ export class OMDbAPI extends APIModel {
|
||||||
const data = await fetchData.json();
|
const data = await fetchData.json();
|
||||||
|
|
||||||
if (data.Response === 'False') {
|
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) {
|
if (!data.Search) {
|
||||||
return [];
|
return [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue