diegosouzapw/OmniRoute · error · Error
Remote image exceeds ${maxBytes} byte limit
Error message
Remote image exceeds ${maxBytes} byte limit What it means
Error "Remote image exceeds ${maxBytes} byte limit" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/shared/network/remoteImageFetch.ts:147
...(init as Parameters<typeof undiciFetch>[1]),
dispatcher,
})) as unknown as Response;
} finally {
await dispatcher.close();
}
}) as typeof fetch;
}
function combineSignals(signal: AbortSignal | undefined, timeoutMs: number) {
const timeoutSignal = AbortSignal.timeout(timeoutMs);
if (!signal) return timeoutSignal;
return AbortSignal.any([signal, timeoutSignal]);
}
async function readResponseBuffer(response: Response, maxBytes: number) {
const contentLengthHeader = response.headers.get("content-length");
const contentLength = contentLengthHeader ? Number.parseInt(contentLengthHeader, 10) : null;
if (contentLength !== null && Number.isFinite(contentLength) && contentLength > maxBytes) {
throw new Error(`Remote image exceeds ${maxBytes} byte limit`);
}
if (!response.body) {
const buffer = Buffer.from(await response.arrayBuffer());
if (buffer.byteLength > maxBytes) {
throw new Error(`Remote image exceeds ${maxBytes} byte limit`);
}
return buffer;
}
const reader = response.body.getReader();
const chunks: Buffer[] = [];
let totalBytes = 0;
try {
while (true) {
const { done, value } = await reader.read();
if (done) break;View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/shared/network/remoteImageFetch.ts:147 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/835010ff5d253d1a.
Report an issue: GitHub.