Skip to content

Class: RateLimitError

Defined in: src/errors.ts:32

Error thrown when API rate limits are exceeded. Extends OpenCloudError with retry timing information.

Extends

Constructors

Constructor

ts
new RateLimitError(
   message, 
   retryAfter?, 
   details?): RateLimitError;

Defined in: src/errors.ts:43

Creates a new RateLimitError instance.

Parameters

ParameterTypeDefault valueDescription
messagestring"Rate limit exceeded"Error message (defaults to "Rate limit exceeded")
retryAfter?numberundefinedSeconds until the rate limit resets
details?unknownundefinedAdditional error details from the API response

Returns

RateLimitError

Overrides

OpenCloudError.constructor

Properties

status?

ts
optional status: number;

Defined in: src/errors.ts:16

HTTP status code (e.g., 404, 500)

Inherited from

OpenCloudError.status


code?

ts
optional code: string;

Defined in: src/errors.ts:17

Error code from the API (e.g., "RESOURCE_NOT_FOUND")

Inherited from

OpenCloudError.code


details?

ts
optional details: unknown;

Defined in: src/errors.ts:18

Additional error details from the API response

Inherited from

OpenCloudError.details


retryAfter?

ts
optional retryAfter: number;

Defined in: src/errors.ts:34

Number of seconds to wait before retrying (if provided by the API)