louislam/uptime-kuma · warning · Error
slug is not found
Error message
slug is not found
What it means
Thrown by the postIncident handler when StatusPage.slugToID(slug) returns a falsy id, meaning no status page row matches the slug. It prevents posting an incident to a non-existent status page and runs before any incident bean is created.
Source
Thrown at server/socket-handlers/status-page-socket-handler.js:41
throw new Error("Please input content");
}
}
/**
* Socket handlers for status page
* @param {Socket} socket Socket.io instance to add listeners on
* @returns {void}
*/
module.exports.statusPageSocketHandler = (socket) => {
// Post or edit incident
socket.on("postIncident", async (slug, incident, callback) => {
try {
checkLogin(socket);
let statusPageID = await StatusPage.slugToID(slug);
if (!statusPageID) {
throw new Error("slug is not found");
}
let incidentBean;
if (incident.id) {
incidentBean = await R.findOne("incident", " id = ? AND status_page_id = ? ", [
incident.id,
statusPageID,
]);
}
if (incidentBean == null) {
incidentBean = R.dispense("incident");
}
incidentBean.title = incident.title;
incidentBean.content = incident.content;
incidentBean.style = incident.style;View on GitHub (pinned to 6b5ea01557)
Solutions
- Use a slug returned by the status page list/getStatusPage endpoints for the current user.
- Verify the slug exists before opening the incident composer.
- If the page was deleted, recreate it or pick another slug.
Defensive patterns
Strategy: validation
Validate before calling
const slugs = (await StatusPage.getStatusPageList()).map(p => p.slug);
if (!slugs.includes(slug)) throw new Error("slug is not found");
socket.emit("postIncident", slug, incident, cb); Type guard
function isKnownSlug(slug, known) {
return typeof slug === "string" && Array.isArray(known) && known.includes(slug);
} Try / catch
try { await emitAsync("postIncident", slug, incident, cb); }
catch (e) { if (/slug is not found/.test(e.message)) refreshStatusPages(); else throw e; } Prevention
- Pull slug from the status page list endpoint.
- Match slug casing exactly (case-sensitive).
- Discard slugs from deleted pages.
When it happens
Trigger: Client emits postIncident with a slug that does not resolve to any status_page row (typo, deleted page, slug not yet created).
Common situations: Slug copy/paste error; status page was deleted; frontend keeps a stale slug after navigation; slug case mismatch (slugs are case-sensitive).
Related errors
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/d11f4fc21717ef12.
Report an issue: GitHub.