File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class MobyGamesAPI extends APIModel {
2222 console . log ( `MDB | api "${ this . apiName } " queried by Title` ) ;
2323
2424 if ( ! this . plugin . settings . MobyGamesKey ) {
25- console . error ( Error ( `MDB | API key for ${ this . apiName } missing.` ) ) ;
25+ console . error ( new Error ( `MDB | API key for ${ this . apiName } missing.` ) ) ;
2626 return [ ] ;
2727 }
2828
@@ -66,7 +66,7 @@ export class MobyGamesAPI extends APIModel {
6666 console . log ( `MDB | api "${ this . apiName } " queried by ID` ) ;
6767
6868 if ( ! this . plugin . settings . MobyGamesKey ) {
69- console . log ( Error ( `MDB | API key for ${ this . apiName } missing.` ) ) ;
69+ throw Error ( `MDB | API key for ${ this . apiName } missing.` ) ;
7070 }
7171
7272 const searchUrl = `${ this . apiUrl } /games?id=${ encodeURIComponent ( id ) } &api_key=${ this . plugin . settings . MobyGamesKey } ` ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export class OMDbAPI extends APIModel {
2929 console . log ( `MDB | api "${ this . apiName } " queried by Title` ) ;
3030
3131 if ( ! this . plugin . settings . OMDbKey ) {
32- console . error ( Error ( `MDB | API key for ${ this . apiName } missing.` ) ) ;
32+ console . error ( new Error ( `MDB | API key for ${ this . apiName } missing.` ) ) ;
3333 return [ ] ;
3434 }
3535
You can’t perform that action at this time.
0 commit comments