{"record":{"id":"986483a50af740e2","repo":"louislam/uptime-kuma","slug":"status-page-is-not-found","errorCode":null,"errorMessage":"Status Page is not found","messagePattern":"Status Page is not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"server/socket-handlers/status-page-socket-handler.js","lineNumber":511,"sourceCode":"                    server.entryPage = \"dashboard\";\n                    await Settings.set(\"entryPage\", server.entryPage, \"general\");\n                }\n\n                // No need to delete records from `status_page_cname`, because it has cascade foreign key.\n                // But for incident & group, it is hard to add cascade foreign key during migration, so they have to be deleted manually.\n\n                // Delete incident\n                await R.exec(\"DELETE FROM incident WHERE status_page_id = ? \", [statusPageID]);\n\n                // Delete group\n                await R.exec(\"DELETE FROM `group` WHERE status_page_id = ? \", [statusPageID]);\n\n                // Delete status_page\n                await R.exec(\"DELETE FROM status_page WHERE id = ? \", [statusPageID]);\n\n                apicache.clear();\n            } else {\n                throw new Error(\"Status Page is not found\");\n            }\n\n            callback({\n                ok: true,\n            });\n        } catch (error) {\n            callback({\n                ok: false,\n                msg: error.message,\n            });\n        }\n    });\n};\n\n/**\n * Check slug a-z, 0-9, - only\n * Regex from: https://stackoverflow.com/questions/22454258/js-regex-string-validation-for-slug\n * @param {string} slug Slug to test","sourceCodeStart":493,"sourceCodeEnd":529,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/socket-handlers/status-page-socket-handler.js#L493-L529","documentation":"Thrown by the deleteStatusPage handler in its else branch: when the resolved statusPageID does not correspond to an existing page (the lookup used to authorize deletion failed). It is the terminal branch after the delete flow confirms there is nothing to delete.","triggerScenarios":"Client emits 'deleteStatusPage' with a slug/id that no longer resolves to a status_page row; the handler reaches the else branch and rejects the deletion.","commonSituations":"Page already deleted in another session; stale delete button; race between two clients deleting the same page; slug typo.","solutions":["Refresh the status page list before allowing delete; hide delete for pages no longer present.","Treat the error as already-deleted and update the UI accordingly.","Confirm the slug/id passed is from the current page list."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const exists = statusPages.some(p => Number(p.id) === Number(statusPageID));\nif (!exists) throw new Error(\"Status Page is not found\");\nsocket.emit(\"deleteStatusPage\", statusPageID, cb);","typeGuard":"function statusPageExists(id, list) {\n  return Array.isArray(list) && list.some(p => Number(p.id) === Number(id));\n}","tryCatchPattern":"try { await emitAsync(\"deleteStatusPage\", id, cb); }\ncatch (e) { if (/is not found/.test(e.message)) removeFromUI(id); else throw e; }","preventionTips":["Hide delete for pages not in the current list.","Drop stale ids after deletion elsewhere.","Treat not-found on delete as success in the UI."],"tags":["status-page","not-found","delete","socket-io"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}