File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 11import { APIModel } from '../APIModel' ;
2+ import { Notice } from 'obsidian' ;
23import { MediaTypeModel } from '../../models/MediaTypeModel' ;
34import MediaDbPlugin from '../../main' ;
45import { GameModel } from '../../models/GameModel' ;
@@ -23,6 +24,7 @@ export class MobyGamesAPI extends APIModel {
2324
2425 if ( ! this . plugin . settings . MobyGamesKey ) {
2526 console . error ( new Error ( `MDB | API key for ${ this . apiName } missing.` ) ) ;
27+ new Notice ( `MediaDB | API key for ${ this . apiName } missing.` ) ;
2628 return [ ] ;
2729 }
2830
@@ -66,6 +68,7 @@ export class MobyGamesAPI extends APIModel {
6668 console . log ( `MDB | api "${ this . apiName } " queried by ID` ) ;
6769
6870 if ( ! this . plugin . settings . MobyGamesKey ) {
71+ new Notice ( `MediaDB | API key for ${ this . apiName } missing.` ) ;
6972 throw Error ( `MDB | API key for ${ this . apiName } missing.` ) ;
7073 }
7174
Original file line number Diff line number Diff line change 11import { APIModel } from '../APIModel' ;
2+ import { Notice } from 'obsidian' ;
23import { MediaTypeModel } from '../../models/MediaTypeModel' ;
34import { MovieModel } from '../../models/MovieModel' ;
45import MediaDbPlugin from '../../main' ;
@@ -30,6 +31,7 @@ export class OMDbAPI extends APIModel {
3031
3132 if ( ! this . plugin . settings . OMDbKey ) {
3233 console . error ( new Error ( `MDB | API key for ${ this . apiName } missing.` ) ) ;
34+ new Notice ( `MediaDB | API key for ${ this . apiName } missing.` ) ;
3335 return [ ] ;
3436 }
3537
@@ -108,6 +110,7 @@ export class OMDbAPI extends APIModel {
108110 console . log ( `MDB | api "${ this . apiName } " queried by ID` ) ;
109111
110112 if ( ! this . plugin . settings . OMDbKey ) {
113+ new Notice ( `MediaDB | API key for ${ this . apiName } missing.` ) ;
111114 throw Error ( `MDB | API key for ${ this . apiName } missing.` ) ;
112115 }
113116
You can’t perform that action at this time.
0 commit comments