supress pocketbase auto cancellation error

This commit is contained in:
Henry Dollman
2025-01-31 17:16:21 -05:00
parent 0b4742d064
commit 0759a3607c

View File

@@ -43,13 +43,20 @@ const verifyAuth = () => {
} }
export const updateSystemList = async () => { export const updateSystemList = async () => {
const records = await pb try {
.collection<SystemRecord>("systems") const records = await pb
.getFullList({ sort: "+name", fields: "id,name,host,info,status" }) .collection<SystemRecord>("systems")
if (records.length) { .getFullList({ sort: "+name", fields: "id,name,host,info,status" })
$systems.set(records) if (records.length) {
} else { $systems.set(records)
verifyAuth() } else {
verifyAuth()
}
} catch (err) {
// @ts-ignore supress pocketbase auto cancellation error
if (err.isAbort) {
return
}
} }
} }