diegosouzapw/OmniRoute · error · Error
OmniRoute ${upstream.status}: ${errText}
Error message
OmniRoute ${upstream.status}: ${errText} What it means
Error "OmniRoute ${upstream.status}: ${errText}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/mitm/handlers/kiro.ts:36
async intercept(
req: IncomingMessage,
res: ServerResponse,
body: Buffer,
mappedModel: string,
): Promise<void> {
const startedAt = this.now();
const intercepted = await this.hookBufferStart(req, body, mappedModel);
try {
const payload = JSON.parse(body.toString());
payload.model = mappedModel;
const upstreamStart = this.now();
const upstream = await this.fetchRouter(payload, "/v1/messages", req.headers);
if (!upstream.ok) {
const errText = await upstream.text().catch(() => "");
throw new Error(`OmniRoute ${upstream.status}: ${errText}`);
}
let collected = "";
await this.pipeSSE(upstream, res, (chunk) => {
collected += chunk.toString();
});
const total = this.now() - startedAt;
this.hookBufferUpdate(intercepted, {
status: upstream.status,
responseHeaders: Object.fromEntries(upstream.headers.entries()),
responseBody: collected,
responseSize: Buffer.byteLength(collected),
proxyLatencyMs: upstreamStart - startedAt,
upstreamLatencyMs: total - (upstreamStart - startedAt),
});
} catch (err) {
await this.hookBufferError(intercepted, err);View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/mitm/handlers/kiro.ts:36 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/77417d95a3bc6f2d.
Report an issue: GitHub.