Skip to main content

Extends

  • Error

Constructors

Constructor

new APIError(
   statusCode: number, 
   errorType: APIErrorType, 
   errorMessage: string, 
   correlationId?: string, 
   errorLink?: string, 
   cause?: Error): APIError;

Parameters

ParameterType
statusCodenumber
errorTypeAPIErrorType
errorMessagestring
correlationId?string
errorLink?string
cause?Error

Returns

APIError

Overrides

Error.constructor

Methods

toJSON()

toJSON(): {
  errorLink?: string;
  correlationId?: string;
  name: string;
  statusCode: number;
  errorType: APIErrorType;
  errorMessage: string;
};

Returns

{
  errorLink?: string;
  correlationId?: string;
  name: string;
  statusCode: number;
  errorType: APIErrorType;
  errorMessage: string;
}
errorLink?
optional errorLink: string;
correlationId?
optional correlationId: string;
name
name: string;
statusCode
statusCode: number;
errorType
errorType: APIErrorType;
errorMessage
errorMessage: string;

Properties

PropertyType
statusCodenumber
errorTypeAPIErrorType
errorMessagestring
correlationId?string
errorLink?string
I