Cubicle

CubicleApiError

The CubicleApiError class of @cubicle/sdk: its constructor, properties and methods.

The Cubicle API answered with an error status. code is the API's error code, such as not_found, conflict or rate_limited, or http_<status> when the response carried none. Rate limits and transient failures were already retried when this is raised.

Extends

Constructors

Constructor

new CubicleApiError(
   status, 
   code, 
   message, 
   detail, 
   retryAfterSeconds
): CubicleApiError;

Parameters

ParameterTypeDescription
statusnumberThe HTTP status, such as 404 or 409.
codestring-
messagestring-
detailRecord<string, unknown>Extra fields from the API's error body.
retryAfterSecondsnumber | undefinedFrom Retry-After, for rate_limited, blocked and similar refusals.

Returns

CubicleApiError

Overrides

CubicleError.constructor

Properties

PropertyModifierTypeDescription
cause?publicunknown-
codereadonlystringA stable machine-readable code, such as not_found or wait_timeout.
detailreadonlyRecord<string, unknown>Extra fields from the API's error body.
messagepublicstring-
namepublicstringAlways "CubicleApiError".
retryAfterSecondsreadonlynumber | undefinedFrom Retry-After, for rate_limited, blocked and similar refusals.
stack?publicstring-
statusreadonlynumberThe HTTP status, such as 404 or 409.

On this page