All 17 sections

How-to › Section 2

Make calls that survive failure#

Timeouts, retries, backoff, rate limits, idempotency, caching and error handling, on the client and server side of any API. These branches own the behavior; an SDK feature that implements it is one option here.

14 guides in 5 topics. Every guide compares its approaches and shows the output its commands printed.

Set retries and timeouts 4 guides

Deadline and retry policy for outbound calls: connect versus read timeouts, exponential backoff with jitter, retry budgets, which status codes and transport errors are retryable, retrying streaming and non-idempotent calls, circuit breakers, and adding the behavior to an SDK you ship.

Set and respect rate limits 1 guide

Both sides of a quota: publishing RateLimit header fields (IETF draft) and Retry-After, 429 versus 503, per-key and per-tenant limits, burst allowances; and on the client, reading the headers, client-side token buckets, shared limiters in Redis for many workers, concurrency limits, queueing for bursty agent traffic.

Make writes safe to retry 1 guide

Making a retried write safe on both sides: the Idempotency-Key header (IETF draft), key generation and storage, fingerprinting request bodies, server-side replay windows, conflicts on mismatched payloads, and at-least-once delivery semantics.

Cache API responses 2 guides

Client and server caching: ETag and If-None-Match, Cache-Control, stale-while-revalidate, TTL caches, cache keys that include auth, invalidation on write, CDN caching of API responses.

Handle and design API errors 6 guides

Errors a client and an agent can act on, from both sides: RFC 9457 problem details, stable error codes, field-level validation errors, retryable versus terminal taxonomies, partial failures in batches, mapping HTTP status to typed errors per language, and fail-safe semantics for autonomous callers (no vague 500s, 429 always with Retry-After).

All how-to guides

Generate the client instead of writing it#

Retries, timeouts, pagination and auth are the same problems in every client. Voxgig generates them from your OpenAPI description, in 23 languages, from one model.

Get the Voxgig dispatch

Short notes on building SDKs, CLIs, REPLs, and MCPs for API-first teams, plus the occasional Fireside episode pick.

By signing up you agree to our Terms and Conditions.