BackstageAPIError
@ticketlayer/backstage / BackstageAPIError
Class: BackstageAPIError
Defined in: client.ts:239
Custom error class for API errors with error code support
Extends
Error
Constructors
Constructor
new BackstageAPIError(
message: string,
code: string,
statusCode: number): BackstageAPIError;
Defined in: client.ts:243
Parameters
| Parameter | Type |
|---|---|
message | string |
code | string |
statusCode | number |
Returns
BackstageAPIError
Overrides
Error.constructor
Methods
isAuthenticationError()
isAuthenticationError(): boolean;
Defined in: client.ts:260
Check if this is an authentication error
Returns
boolean
isNotFound()
isNotFound(): boolean;
Defined in: client.ts:274
Check if this is a not found error
Returns
boolean
isPermissionDenied()
isPermissionDenied(): boolean;
Defined in: client.ts:253
Check if this is a permission denied error
Returns
boolean
isSessionExpired()
isSessionExpired(): boolean;
Defined in: client.ts:267
Check if this is a session expired error (401 that couldn't be refreshed)
Returns
boolean
isValidationError()
isValidationError(): boolean;
Defined in: client.ts:281
Check if this is a validation error
Returns
boolean
Properties
code
readonly code: string;
Defined in: client.ts:240
statusCode
readonly statusCode: number;
Defined in: client.ts:241