fix #77
This commit is contained in:
parent
33f55f6961
commit
db8a1b53c6
1 changed files with 5 additions and 1 deletions
|
|
@ -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 [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue