thread_autoupdater.js: Display status code on err

This commit is contained in:
Jon 2024-02-25 22:21:16 +00:00 committed by 0
parent e64dd3f9ab
commit e33c6825fc
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ $().ready(() => {
if (stats != null) { if (stats != null) {
threadStats = stats threadStats = stats
} else { } else {
threadState = "Pruned" threadState = String(res.status)
} }
} else { } else {
throw new Error(`Server responded with non-OK status '${res.status}'`) throw new Error(`Server responded with non-OK status '${res.status}'`)
@ -98,7 +98,7 @@ $().ready(() => {
updateSecondsByTSLP(lastPostC.getContent().getInfo()) updateSecondsByTSLP(lastPostC.getContent().getInfo())
} }
} else if (res.status == 404) { } else if (res.status == 404) {
threadState = "Pruned" threadState = String(res.status)
} else { } else {
throw new Error(`Server responded with non-OK status '${res.status}'`) throw new Error(`Server responded with non-OK status '${res.status}'`)
} }