diegosouzapw/OmniRoute · error
[API Bridge] Failed to start:
Error message
[API Bridge] Failed to start:
What it means
API bridge generic start error: server.listen or socket setup failed with a non-EADDRINUSE error (bind permission, invalid host, fd limits). The bridge is skipped; core serving on the dashboard port continues.
Solutions
- Check API_HOST validity and bind permissions (privileged ports)
- Review the logged error message for the errno
- Restart after resolving the bind issue
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/lib/apiBridgeServer.ts:226 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/17688b9ade908026.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/apiBridgeServer.ts:226
JSON.stringify({
error: "not_found",
message: "API port only serves OpenAI-compatible routes.",
})
);
return;
}
proxyUpgrade(req, socket, head, dashboardPort);
});
server.on("error", (error: NodeJS.ErrnoException) => {
if (error?.code === "EADDRINUSE") {
console.warn(
`[API Bridge] Port ${apiPort} is already in use. API bridge disabled. (dashboard: ${dashboardPort})`
);
return;
}
console.warn("[API Bridge] Failed to start:", error?.message || error);
});
server.listen(apiPort, host, () => {
globalThis.__omnirouteApiBridgeStarted = true;
console.log(`[API Bridge] Listening on ${host}:${apiPort} -> dashboard:${dashboardPort}`);
});
}
View on GitHub (pinned to a179ffed5b)