diegosouzapw/OmniRoute · error
{"ok":false}
Error message
{"ok":false} What it means
liveServer internal-event guard: a request hit /__omniroute_event on the live dashboard WS server but was rejected — wrong method/path yields 404, and non-loopback sources are refused before any handling. The {ok:false} body is the generic refusal payload.
Solutions
- Send POST to exactly /__omniroute_event from the same host
- Use a loopback source (127.0.0.1/::1) — remote callers are rejected
- Publish events through the event bus API instead of the internal endpoint
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/server/ws/liveServer.ts:326 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/45d84981b288af3c.
Report an issue: GitHub.
Appendix: source
Thrown at src/server/ws/liveServer.ts:326
function subscribeToEventBus(): () => void {
return onAny((event: DashboardEventName, payload: unknown) => {
publishDashboardEvent(event, payload);
});
}
function isLoopbackRequest(req: IncomingMessage): boolean {
const addr = req.socket.remoteAddress;
return addr === "127.0.0.1" || addr === "::1" || addr === "::ffff:127.0.0.1";
}
function handleInternalEventRequest(req: IncomingMessage, res: ServerResponse): void {
if (req.method !== "POST" || req.url !== "/__omniroute_event") {
res.writeHead(404).end();
return;
}
if (!isLoopbackRequest(req)) {
res.writeHead(403, { "content-type": "application/json" }).end(JSON.stringify({ ok: false }));
return;
}
let body = "";
req.setEncoding("utf8");
req.on("data", (chunk) => {
body += chunk;
if (body.length > 1_000_000) {
req.destroy(new Error("Internal event payload too large"));
}
});
req.on("error", () => {
if (!res.headersSent) res.writeHead(400).end();
});
req.on("end", () => {
try {
const parsed = JSON.parse(body || "{}");
const event = parsed.event as DashboardEventName;View on GitHub (pinned to a179ffed5b)