@salesforce/b2c-tooling-sdk / clients / createRateLimitMiddleware
Function: createRateLimitMiddleware()
createRateLimitMiddleware(
config):Middleware
Defined in: packages/b2c-tooling-sdk/src/clients/middleware.ts:254
Creates rate limiting middleware for openapi-fetch clients.
This middleware inspects responses for rate-limit status codes (by default 429 Too Many Requests), uses the Retry-After header when present to determine a delay, and retries the request up to a configurable limit.
The middleware is generic and can be used by MRT and other clients. It does not currently read CLI configuration directly; callers should pass configuration via the factory function.
Parameters
config
RateLimitMiddlewareConfig = {}
Returns
Middleware