louislam/uptime-kuma · warning · Error
Please input all fields
Error message
Please input all fields
What it means
Thrown by the addStatusPage handler when title or slug is empty after trimming. Both fields are required to create a new status page; the check runs right after checkLogin and the trim() of each value.
Source
Thrown at server/socket-handlers/status-page-socket-handler.js:445
callback({
ok: false,
msg: error.message,
});
}
});
// Add a new status page
socket.on("addStatusPage", async (title, slug, callback) => {
try {
checkLogin(socket);
title = title?.trim();
slug = slug?.trim();
// Check empty
if (!title || !slug) {
throw new Error("Please input all fields");
}
// Make sure slug is string
if (typeof slug !== "string") {
throw new Error("Slug -Accept string only");
}
// lower case only
slug = slug.toLowerCase();
checkSlug(slug);
let statusPage = R.dispense("status_page");
statusPage.slug = slug;
statusPage.title = title;
statusPage.theme = "auto";
statusPage.icon = "";
statusPage.autoRefreshInterval = 300;View on GitHub (pinned to 6b5ea01557)
Solutions
- Supply non-empty trimmed title and slug values before emitting addStatusPage.
- Disable the create button until both fields pass client-side validation.
- Remember slug must also satisfy checkSlug (alphanumeric with single hyphens) afterwards.
Example fix
// before
socket.emit("addStatusPage", "", "", cb);
// after
socket.emit("addStatusPage", "Main", "main", cb); Defensive patterns
Strategy: validation
Validate before calling
title = (title || "").trim();
slug = (slug || "").trim();
if (!title || !slug) throw new Error("Please input all fields");
socket.emit("addStatusPage", title, slug, cb); Type guard
function hasTitleAndSlug(title, slug) {
return typeof title === "string" && typeof slug === "string"
&& title.trim() !== "" && slug.trim() !== "";
} Try / catch
try { await emitAsync("addStatusPage", title, slug, cb); }
catch (e) { if (/input all fields/.test(e.message)) flagBoth(); else throw e; } Prevention
- Disable create until both fields are non-empty.
- Trim inputs before sending.
- Remember slug must also pass checkSlug.
When it happens
Trigger: Client emits 'addStatusPage' (title, slug, callback) with title and/or slug missing, empty, or whitespace-only.
Common situations: User clicks create without filling the form; one field is pasted as whitespace; client sends null/undefined for either argument.
Related errors
- Please input title
- Please input content
- Only allowed PNG logo.
- Invalid analytics type
- Slug -Accept string only
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/77eb908424605ba3.
Report an issue: GitHub.