From 5c014d93ba18271f86b690e82e1e63e6cbae74af Mon Sep 17 00:00:00 2001 From: OwsleyJr Date: Sat, 21 Sep 2024 16:48:30 -0700 Subject: [PATCH] fix: add logs for the ping to refresh tokens --- .vscode/settings.json | 8 +++++++- server/api/plextv.ts | 3 ++- server/lib/refreshToken.ts | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1a2375712..c651c976b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,5 +19,11 @@ "typescript.preferences.importModuleSpecifier": "non-relative", "files.associations": { "globals.css": "tailwindcss" - } + }, + "i18n-ally.localesPaths": [ + "src/i18n", + "src/i18n/locale", + "src/pages/discover/movies/language", + "src/pages/discover/tv/language" + ] } diff --git a/server/api/plextv.ts b/server/api/plextv.ts index 2fc4523a8..a62ea8f4b 100644 --- a/server/api/plextv.ts +++ b/server/api/plextv.ts @@ -365,7 +365,7 @@ class PlexTvAPI extends ExternalAPI { } } - public async pingToken() { + public async pingToken(displayName: string): Promise { try { const response = await this.axios.get('/api/v2/ping', { headers: { @@ -379,6 +379,7 @@ class PlexTvAPI extends ExternalAPI { logger.error('Failed to ping token', { label: 'Plex Refresh Token', errorMessage: e.message, + user: displayName, }); } } diff --git a/server/lib/refreshToken.ts b/server/lib/refreshToken.ts index ac7bd3463..4528fe2ce 100644 --- a/server/lib/refreshToken.ts +++ b/server/lib/refreshToken.ts @@ -28,7 +28,7 @@ class RefreshToken { } const plexTvApi = new PlexTvAPI(user.plexToken); - plexTvApi.pingToken(); + plexTvApi.pingToken(user.displayName); } }