Skip to content

Commit

Permalink
improve error logging and code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Blanc committed Oct 29, 2023
1 parent a7c38e8 commit 88f63bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/jellyfin/jellyfin-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 88f63bd

Please sign in to comment.