Skip to content

Commit

Permalink
chore: Improve external api get logging (#1176)
Browse files Browse the repository at this point in the history
* chore: improved external API log messages so they're clearer

* chore: fix layout
  • Loading branch information
jorenn92 authored Jul 16, 2024
1 parent 68cbbc1 commit c79dc9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class ExternalApiService {

return response.data;
} catch (err) {
Logger.debug(`GET request failed: ${err}`);
Logger.debug(`GET request to ${endpoint} failed: ${err}`, 'ExternalAPI');
return undefined;
}
}
Expand Down
4 changes: 3 additions & 1 deletion server/src/modules/collections/collection-worker.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ export class CollectionWorkerService extends TaskBase {
)?.id;
}

const tmdbShow = await this.tmdbApi.getTvShow({ tvId: media.tmdbId });
const tmdbShow = media.tmdbId
? await this.tmdbApi.getTvShow({ tvId: media.tmdbId })
: undefined;

if (!tmdbShow?.external_ids?.tvdb_id) {
let plexData = await this.plexApi.getMetadata(media.plexId.toString());
Expand Down

0 comments on commit c79dc9b

Please sign in to comment.