STITCH_TIMEOUT
A total or per-attempt timeout aborted the call.
What you'll see
A call aborts and throws a StitchError once a configured timeout elapses.
timeout.total bounds the whole call across every retry and its backoff;
timeout.each bounds a single attempt. The runtime enforces these with a
real AbortSignal, so the in-flight request is actually aborted rather than left
running while the call gives up — the underlying request receives the abort.
STITCH_TIMEOUT is this page's catalog ID, not a runtime
value — the thrown error has no .code. A timed-out call is a
StitchError with no status and attempts of at least 1: the
request went out, but no response ever came back (the message is
timed out after <n>ms). See
telling failures apart.
Why it happens
Two distinct triggers land here:
- The dependency is slow or unreachable. The request genuinely takes longer than the budget you allowed — a degraded upstream, a cold start, or a host that never answers and ties up the attempt until the signal fires.
- The budget is too tight.
eachis shorter than the dependency's normal latency, so healthy responses get cut off; ortotaldoesn't leave room for every attempt plus the backoff between them, so the whole call aborts mid- way through a retry sequence that would otherwise have succeeded.
How to fix
Raise total and each to a realistic budget for the dependency's actual
latency. When you also configure retry, make
total large enough to cover the full sequence — as a rule of thumb,
total ≥ attempts × (each + backoff) — so the call isn't aborted partway
through a retry that would have landed.
import { } from 'stitchapi';
const = ({
: 'https://api.example.com',
: '/reports/slow',
: { : 3, : { : 200 } },
: {
// Each attempt gets 5s; the whole call (3 attempts + backoff) gets 20s.
: '5s',
: '20s',
},
});Check the dependency's measured latency before widening the budget — if it is consistently slow or flapping, a longer timeout only delays the failure. For a dependency that is genuinely failing, pair the timeout with retry for transient blips and a circuit breaker to fast-fail once it stops responding, instead of waiting out the timeout on every call.
Stuck, or debugging with an agent? Ask the docs
MCP — search_docs('STITCH_TIMEOUT') pulls
this page and the related guides straight into context.