Errors & limits

Status codes, error responses, rate limiting, and retry guidance for the Kelp API.

Kelp uses standard HTTP status codes. 2xx is success; 4xx is a problem with the request; 5xx is a server or upstream error.

Status codes

StatusMeaningRetry?
200Success.-
400Malformed request (bad JSON, invalid field).No - fix the request.
401 / 403Missing, invalid, or out-of-scope X-Api-Key.No - check the key.
404Unknown collection or endpoint.No.
429Rate limited.Yes, after Retry-After.
502 / 503 / 504Upstream or transient server error.Yes, with backoff.

Rate limiting

When you exceed the rate limit the API returns 429 with a Retry-After header (delta-seconds or an HTTP date). Wait at least that long before retrying.

HTTP/1.1 429 Too Many Requests
Retry-After: 2

503 responses may also carry Retry-After.

Retry guidance

Retry only idempotent failures - 429, 502, 503, 504, and network/timeout errors. Use exponential backoff with jitter, and honor Retry-After when present. Do not retry 4xx request errors (other than 429).

The @kelpclick/client SDK implements this retry policy for you - backoff with jitter, Retry-After support, and a configurable retry count. If you call the API directly, replicate it on your side.

Request correlation

Responses may include an x-request-id (or x-trace-id) header. Capture it and include it when reporting an issue so the failing request can be traced.

Timeouts

Set a client-side timeout on every request and treat a timeout as a retryable failure. The SDK defaults to a 10s per-request timeout; pick a value that suits your surface (for example, a shorter budget for a storefront search-as-you-type).

On this page