Repository navigation
Overview
New SDK surface:
quoteTimeoutonquotes.get()QUOTE_TIMEOUTerror code, reported inquote.warnings
SDK 0.4.0 requires Pegaroute v0.9.3 for quoteTimeout.
npm install @pegaroute/sdk@0.4.00.4.0 is additive over 0.3.0. Existing calls remain valid.
Upgrading
quoteTimeout controls how long Pegaroute collects provider quotes:
- omitted or
0: wait for every provider (the current behaviour) - positive: a collection window in seconds. The full window is used, then pending providers are ignored if at least one quote arrived
- negative: return once that many valid quotes arrived, so
-1returns the first quote
const quote = await pr.quotes.get({ ...params, quoteTimeout: 5 });
for (const warning of quote.warnings) {
if (warning.code === "QUOTE_TIMEOUT") {
// This provider was still pending when collection stopped.
}
}This is separate from the client's HTTP timeoutMs, which bounds the whole request, so keep timeoutMs above the quote window.
Full changelog: v0.3.0...v0.4.0