mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-28 03:41:58 +00:00
Add debug logging for unknown error
This commit is contained in:
parent
f9123e8a04
commit
fb093185d9
1 changed files with 2 additions and 1 deletions
|
@ -130,7 +130,7 @@ class Immich {
|
||||||
password
|
password
|
||||||
})
|
})
|
||||||
const res = await fetch(url)
|
const res = await fetch(url)
|
||||||
if ((res.headers.get('Content-Type') || '').includes('application/json')) {
|
if ((res.headers.get('Content-Type') || '').toLowerCase().includes('application/json')) {
|
||||||
const jsonBody = await res.json()
|
const jsonBody = await res.json()
|
||||||
if (jsonBody) {
|
if (jsonBody) {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
@ -164,6 +164,7 @@ class Immich {
|
||||||
// Otherwise return failure
|
// Otherwise return failure
|
||||||
log('Immich response ' + res.status + ' for key ' + key)
|
log('Immich response ' + res.status + ' for key ' + key)
|
||||||
try {
|
try {
|
||||||
|
console.log(res.headers.get('Content-Type'))
|
||||||
console.log((await res.text()).slice(0, 500))
|
console.log((await res.text()).slice(0, 500))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
|
|
Loading…
Reference in a new issue