diegosouzapw/OmniRoute · error · SafeOutboundFetchError
TIMEOUT
TIMEOUT
Error message
${error.message} What it means
SafeOutboundFetch failure normalization: the SSRF-guarded outbound fetch wrapper caught a raw fetch error and is classifying it into a SafeOutboundFetchError. The message field here is the passthrough of the underlying error message after normalization (timeout, DNS, TLS, or blocked-host classes).
Solutions
- Inspect the error code on SafeOutboundFetchError (TIMEOUT/DNS/BLOCKED) for the real cause
- Retry only when isRetryable is true
- Verify the target URL passes the SSRF allowlist
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/shared/network/safeOutboundFetch.ts:258 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/9401bd9d39135890.
Report an issue: GitHub.
Appendix: source
Thrown at src/shared/network/safeOutboundFetch.ts:258
} catch {
// Ignore body cancellation errors when preparing a retry.
}
}
function normalizeFetchFailure(
error: unknown,
targetUrl: string,
method: string,
attempts: number
): SafeOutboundFetchError {
if (error instanceof SafeOutboundFetchError) {
error.attempts = attempts;
return error;
}
if (error instanceof FetchTimeoutError) {
return new SafeOutboundFetchError(error.message, {
code: "TIMEOUT",
url: targetUrl,
method,
attempts,
timeoutMs: error.timeoutMs,
isRetryable: true,
cause: error,
});
}
const message = error instanceof Error ? error.message : String(error);
const code = error && typeof error === "object" ? (error as { code?: string }).code : undefined;
return new SafeOutboundFetchError(message || `Outbound request failed for ${targetUrl}`, {
code: "NETWORK_ERROR",
url: targetUrl,
method,
attempts,
isRetryable: code !== "PROXY_UNREACHABLE",View on GitHub (pinned to a179ffed5b)