diegosouzapw/OmniRoute · error · Error

Video Bridge processing was aborted

Error message

Video Bridge processing was aborted

What it means

VideoBridgeGuardrail.preCall checks context.signal.aborted before doing any video processing; if the request was already cancelled (client disconnect or upstream abort), processing is refused immediately with this error so no work is spent on a dead request.

Solutions

  1. Treat as a normal cancellation: stop processing and clean up without retrying
  2. Ensure clients keep the connection alive if video analysis is expected to complete
  3. Check for premature aborts (short timeouts, proxy disconnects) if this fires unexpectedly
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/lib/guardrails/videoBridge.ts:420 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/b887ab36b083acae. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/guardrails/videoBridge.ts:420

}

export class VideoBridgeGuardrail extends BaseGuardrail {
  name = "video-bridge";
  priority = 7;

  private readonly deps: VideoBridgeDependencies;

  constructor(options?: { enabled?: boolean; deps?: VideoBridgeDependencies }) {
    super("video-bridge", { priority: 7, enabled: options?.enabled });
    this.deps = options?.deps ?? {};
  }

  async preCall(payload: unknown, context: GuardrailContext): Promise<GuardrailResult<unknown>> {
    if (!this.enabled || context.disabledGuardrails?.includes("video-bridge")) {
      return { block: false };
    }

    if (context.signal?.aborted) throw new Error("Video Bridge processing was aborted");

    const body = payload as VideoBridgeBody;
    const model = context.model || body.model;
    if (!model) return { block: false };

    const getSettings = this.deps.getSettings ?? defaultGetSettings;
    let persisted: Record<string, unknown> = {};
    try {
      persisted = await getSettings();
    } catch {
      // Early boot can run before the settings database is ready; defaults are safe.
    }
    const runtime = resolveVideoBridgeRuntimeSettings(persisted);
    if (!runtime.enabled) return { block: false };

    const parts = extractVideoParts(body);
    if (parts.length === 0) return { block: false };

View on GitHub (pinned to a179ffed5b)