Add debug logging for unknown error
This commit is contained in:
parent
f9123e8a04
commit
fb093185d9
@ -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 New Issue
Block a user