From 88f63bd5677410ad97c5d42fc95fb2de9fda274e Mon Sep 17 00:00:00 2001 From: Sylvain Blanc Date: Sun, 29 Oct 2023 11:57:27 +0100 Subject: [PATCH] improve error logging and code --- backend/jellyfin/jellyfin-client.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/jellyfin/jellyfin-client.js b/backend/jellyfin/jellyfin-client.js index 95b5a424..4de55dcc 100644 --- a/backend/jellyfin/jellyfin-client.js +++ b/backend/jellyfin/jellyfin-client.js @@ -211,7 +211,12 @@ class JellyfinClient { handleAxiosErrorLogging(error) { if (error.response) { - console.log(error.stack); + // No need to log statcktrace for 404 + if(error.response.status === 404) { + console.log(`Jellyfin returned 404 for [${error.request.path}]`) + } else { + console.error(`Error while requesting Jellyfin for path [${error.request.path] ${error.stack}`); + } } else { console.log(error); }