#141 add additional logging for Immich failure responses
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "immich-public-proxy",
|
"name": "immich-public-proxy",
|
||||||
"version": "1.13.5",
|
"version": "1.13.6",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "ts-node src/index.ts",
|
"dev": "ts-node src/index.ts",
|
||||||
"build": "npx tsc",
|
"build": "npx tsc",
|
||||||
|
|||||||
+6
-1
@@ -88,7 +88,12 @@ class Render {
|
|||||||
)
|
)
|
||||||
res.end()
|
res.end()
|
||||||
} else {
|
} 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user