diegosouzapw/OmniRoute · error · DOMException

AbortError

AbortError

Error message

Aborted

What it means

Sentinel abort error thrown by throwIfAborted (a DOMException named AbortError with message 'Aborted') when the request's AbortSignal is already aborted. It is a cooperative-cancellation guard wrapping browser fetch/route operations, not an upstream failure — the client (or OmniRoute's own abort plumbing) cancelled the in-flight Claude Web request.

Solutions

  1. Propagate it as a client-side cancellation (close the SSE stream cleanly, do not retry)
  2. Ensure the signal passed to sendClaudeWebBrowser is not being aborted prematurely by connection pooling or timeout logic
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at open-sse/executors/claude-web/browserTransport.ts:325 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/44a853c9f48a408d. Report an issue: GitHub.

Appendix: source

Thrown at open-sse/executors/claude-web/browserTransport.ts:325

    }

    return {
      status: response.status,
      headers: responseHeaders,
      bodyChunks,
    };
  }, input);

  const chunks = captured.bodyChunks.map((chunk) => Buffer.from(chunk, "base64"));
  return {
    status: captured.status,
    headers: captured.headers,
    body: Buffer.concat(chunks),
  };
}

function throwIfAborted(signal?: AbortSignal | null): void {
  if (signal?.aborted) throw new DOMException("Aborted", "AbortError");
}

async function withAbort<T>(promise: Promise<T>, signal?: AbortSignal | null): Promise<T> {
  if (!signal) return promise;
  throwIfAborted(signal);
  let abortListener: (() => void) | undefined;
  const aborted = new Promise<never>((_, reject) => {
    abortListener = () => reject(new DOMException("Aborted", "AbortError"));
    signal.addEventListener("abort", abortListener, { once: true });
  });
  try {
    return await Promise.race([promise, aborted]);
  } finally {
    if (abortListener) signal.removeEventListener("abort", abortListener);
  }
}

async function captureCompletion(

View on GitHub (pinned to a179ffed5b)