Skip to content
Docs
Reference

Class: LiveAPIError

Class: LiveAPIError in @ticketlayer/live.

@ticketlayer/live


@ticketlayer/live / index / LiveAPIError

Defined in: client.ts:196

Extends#

  • Error

Extended by#

Constructors#

Constructor#

new LiveAPIError(
   message: string, 
   code: string, 
   status: number, 
   info?: {
  data?: Record<string, unknown>;
  details?: LiveAPIErrorDetails;
  moreInfo?: string;
  requestId?: string;
  retryAfter?: number;
}
): LiveAPIError;

Defined in: client.ts:230

Parameters#

ParameterType
messagestring
codestring
statusnumber
info{ data?: Record<string, unknown>; details?: LiveAPIErrorDetails; moreInfo?: string; requestId?: string; retryAfter?: number; }
info.data?Record<string, unknown>
info.details?LiveAPIErrorDetails
info.moreInfo?string
info.requestId?string
info.retryAfter?number

Returns#

LiveAPIError

Overrides#

Error.constructor

Properties#

code#

readonly code: string;

Defined in: client.ts:232


data?#

readonly optional data?: Record<string, unknown>;

Defined in: client.ts:223

The fields the error envelope carries beyond message, code and moreInfo (for example state on STORED_VALUE_NOT_ACTIVE). Absent when the envelope has none.


details#

readonly details: LiveAPIErrorDetails;

Defined in: client.ts:217

What the refusal said beside its message and code: alternatives on SEAT_UNAVAILABLE, suggestion and strands on SINGLE_SEAT_GAP, planVersion on PLAN_VERSION_CHANGED, and any other field of the error envelope or its error.details. Empty when it said nothing more.


moreInfo?#

readonly optional moreInfo?: string;

Defined in: client.ts:204

The reference page for this error code, carrying the request id: <docs>/error/<CODE>?request=<requestId>. Backstage puts one in every error envelope (error.moreInfo) and Live passes the envelope through, so a commerce failure has one; it is absent for a failure Live or this client minted itself (the queue, a rate limit, an expired cart).


requestId?#

readonly optional requestId?: string;

Defined in: client.ts:210

The request id stamped on this request (metadata.requestId, also echoed as x-request-id). Quote it to support: one id traces the storefront, Live and Backstage.


retryAfter?#

readonly optional retryAfter?: number;

Defined in: client.ts:228

Seconds to wait before retrying, from a 429's Retry-After header (delta-seconds, or an HTTP date turned into seconds from now).


status#

readonly status: number;

Defined in: client.ts:233