louislam/uptime-kuma · warning · Error

No slug?

Error message

No slug?

What it means

Thrown by the getStatusPage handler when R.findOne('status_page', ' slug = ? ', [slug]) returns no row. The handler is behind checkLogin, so it is an authenticated lookup that simply did not find a page for the given slug.

Source

Thrown at server/socket-handlers/status-page-socket-handler.js:275

                incident: bean.toPublicJSON(),
            });
        } catch (error) {
            callback({
                ok: false,
                msg: error.message,
                msgi18n: true,
            });
        }
    });

    socket.on("getStatusPage", async (slug, callback) => {
        try {
            checkLogin(socket);

            let statusPage = await R.findOne("status_page", " slug = ? ", [slug]);

            if (!statusPage) {
                throw new Error("No slug?");
            }

            callback({
                ok: true,
                config: await statusPage.toJSON(),
            });
        } catch (error) {
            callback({
                ok: false,
                msg: error.message,
            });
        }
    });

    // Save Status Page
    // imgDataUrl Only Accept PNG!
    socket.on("saveStatusPage", async (slug, config, imgDataUrl, publicGroupList, callback) => {
        try {

View on GitHub (pinned to 6b5ea01557)

Solutions

  1. Use a slug from the user's status page list.
  2. Trim and match the exact slug casing stored in the database.
  3. Create the status page if it does not exist.
Defensive patterns

Strategy: validation

Validate before calling

const slugs = statusPages.map(p => p.slug);
if (!slugs.includes(slug)) throw new Error("No slug?");
socket.emit("getStatusPage", slug, cb);

Type guard

function isKnownStatusPageSlug(slug, list) {
  return typeof slug === "string" && Array.isArray(list) && list.some(p => p.slug === slug);
}

Try / catch

try { await emitAsync("getStatusPage", slug, cb); }
catch (e) { if (/No slug/.test(e.message)) redirectToList(); else throw e; }

Prevention

When it happens

Trigger: Logged-in client emits 'getStatusPage' with a slug that matches no status_page row (typo, deleted, or not yet created).

Common situations: Editor opens a stale link; slug renamed; page deleted in another session; case/whitespace mismatch in the slug.

Related errors


AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12). Data as JSON: /api/errors/5b69d5111b502a7a. Report an issue: GitHub.