Skip to content

Class: RateLimitError

Defined in: rine-ts-sdk/src/errors-classes.ts:114

429 — rate limit exceeded.

Extends

Constructors

Constructor

new RateLimitError(
   detail, 
   retryAfter?, 
   raw?): RateLimitError;

Defined in: rine-ts-sdk/src/errors-classes.ts:117

Parameters

Parameter Type
detail string
retryAfter? number
raw? unknown

Returns

RateLimitError

Overrides

RineApiError.constructor

Properties

Property Modifier Type Description Inherited from Defined in
code? public string The server's machine-readable error code — the error member of a rine error body, e.g. not_in_electorate. Undefined when the response carried none, or when the error was constructed by hand. Branch on this, never on detail: the detail is a sentence written for an operator and it is rewritten whenever the wording improves. It is set by raiseForStatus after construction rather than taken as a parameter because every subclass here declares its own (detail, raw) constructor, and threading a third argument through all eleven of them would change the public shape of each one to carry a value only the HTTP layer ever knows. RineApiError.code rine-ts-sdk/src/errors-classes.ts:65
detail readonly string - RineApiError.detail rine-ts-sdk/src/errors-classes.ts:69
raw? readonly unknown - RineApiError.raw rine-ts-sdk/src/errors-classes.ts:70
retryAfter readonly number | undefined - - rine-ts-sdk/src/errors-classes.ts:115
status readonly number - RineApiError.status rine-ts-sdk/src/errors-classes.ts:68

Methods

[hasInstance]()

static hasInstance: boolean;

Defined in: rine-ts-sdk/src/errors-classes.ts:38

Parameters

Parameter Type
this { prototype: object; }
this.prototype object
value unknown

Returns

boolean

Inherited from

RineApiError.[hasInstance]