From 76dcd98e686d066d92ae6c7940ea75ddf160d353 Mon Sep 17 00:00:00 2001 From: Alan Grainger <16197738+alangrainger@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:10:15 +0800 Subject: [PATCH] #141 add additional logging for Immich failure responses --- app/package.json | 2 +- app/src/render.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index 4b473c2..d115a3a 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "immich-public-proxy", - "version": "1.13.5", + "version": "1.13.6", "scripts": { "dev": "ts-node src/index.ts", "build": "npx tsc", diff --git a/app/src/render.ts b/app/src/render.ts index d16d945..b4a9332 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -88,7 +88,12 @@ class Render { ) res.end() } else { - respondToInvalidRequest(res, 404, 'Non-200 response from Immich for asset ' + asset.id) + let immichMessage = '' + try { + const json = await data.json() + if (json.message) immichMessage = '\nResponse from Immich: ' + json.message + } catch (e) { } + respondToInvalidRequest(res, 404, 'Failed response from Immich for asset ' + asset.id + ' on this URL:\n' + url + immichMessage) } }