{"record":{"id":"17688b9ade908026","repo":"diegosouzapw/OmniRoute","slug":"api-bridge-failed-to-start","errorCode":null,"errorMessage":"[API Bridge] Failed to start:","messagePattern":"\\[API Bridge\\] Failed to start:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/apiBridgeServer.ts","lineNumber":226,"sourceCode":"        JSON.stringify({\n          error: \"not_found\",\n          message: \"API port only serves OpenAI-compatible routes.\",\n        })\n      );\n      return;\n    }\n\n    proxyUpgrade(req, socket, head, dashboardPort);\n  });\n\n  server.on(\"error\", (error: NodeJS.ErrnoException) => {\n    if (error?.code === \"EADDRINUSE\") {\n      console.warn(\n        `[API Bridge] Port ${apiPort} is already in use. API bridge disabled. (dashboard: ${dashboardPort})`\n      );\n      return;\n    }\n    console.warn(\"[API Bridge] Failed to start:\", error?.message || error);\n  });\n\n  server.listen(apiPort, host, () => {\n    globalThis.__omnirouteApiBridgeStarted = true;\n    console.log(`[API Bridge] Listening on ${host}:${apiPort} -> dashboard:${dashboardPort}`);\n  });\n}\n","sourceCodeStart":208,"sourceCodeEnd":234,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/apiBridgeServer.ts#L208-L234","documentation":"Error \"[API Bridge] Failed to start:\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/apiBridgeServer.ts:226 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}