diegosouzapw/OmniRoute · error · VeoArtifactError
VIDEO_ARTIFACT_TOO_LARGE
VIDEO_ARTIFACT_TOO_LARGE
Error message
Video artifact exceeds the maximum supported size
What it means
readCappedBuffer saw a content-length header exceeding maxBytes before reading anything, so the artifact is rejected without downloading. VeoArtifactError VIDEO_ARTIFACT_TOO_LARGE protects memory from oversized upstream payloads.
Solutions
- Raise maxBytes only deliberately — it is a memory guard
- Reject and report rather than streaming the oversize artifact
- Verify the artifact URL actually points to video, not an unexpected huge file
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at open-sse/executors/veoaifree-web.ts:450 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/cbd63b0cebbc6df9.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/executors/veoaifree-web.ts:450
);
}
for (const { address } of resolved) {
if (isPrivateHost(address)) {
throw new VeoArtifactError(
"VIDEO_ARTIFACT_URL_BLOCKED",
"Video artifact host resolves to a blocked address",
502
);
}
}
}
async function readCappedBuffer(response: Response, maxBytes: number): Promise<Buffer> {
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 VeoArtifactError(
"VIDEO_ARTIFACT_TOO_LARGE",
"Video artifact exceeds the maximum supported size",
502
);
}
if (!response.body) {
const buffer = Buffer.from(await response.arrayBuffer());
if (buffer.byteLength > maxBytes) {
throw new VeoArtifactError(
"VIDEO_ARTIFACT_TOO_LARGE",
"Video artifact exceeds the maximum supported size",
502
);
}
return buffer;
}
View on GitHub (pinned to a179ffed5b)