InvokeException class

A custom exception for invoke response errors.

Extends

Error

Constructors

InvokeException(StatusCodes, T)

Properties

Error

Inherited Properties

message
name
stack

Methods

createInvokeResponse()

A factory method that creates a new InvokeResponse object with the status code and body of the current object.

Constructor Details

InvokeException(StatusCodes, T)

new InvokeException(status: StatusCodes, response?: T)

Parameters

status

StatusCodes

The Http status code of the error.

response

T

optional. The body of the exception. Default is null.

Property Details

Error

static Error: ErrorConstructor

Property Value

ErrorConstructor

Inherited Property Details

message

message: string

Property Value

string

Inherited From Error.message

name

name: string

Property Value

string

Inherited From Error.name

stack

stack?: string

Property Value

string

Inherited From Error.stack

Method Details

createInvokeResponse()

A factory method that creates a new InvokeResponse object with the status code and body of the current object.

function createInvokeResponse(): InvokeResponse

Returns

InvokeResponse

A new InvokeResponse object.