thread_autoupdater.js: Display status code on err

This commit is contained in:
Jon 2024-02-25 22:21:16 +00:00
parent a57e175b5a
commit 0dad3dc61b
No known key found for this signature in database
GPG Key ID: 0175F5C9B8E9F984
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}'`)
} }