RestError class

Extends

Error

Constructors

RestError(string, string, number, WebResourceLike, HttpOperationResponse, any)

Properties

body
code
PARSE_ERROR
request
REQUEST_ABORTED_ERROR
REQUEST_SEND_ERROR
response
statusCode

Inherited Properties

message
name
prepareStackTrace

Optional override for formatting stack traces

See https://v8.dev/docs/stack-trace-api#customizing-stack-traces

stack
stackTraceLimit

Inherited Methods

captureStackTrace(object, Function)

Create .stack property on a target object

Constructor Details

RestError(string, string, number, WebResourceLike, HttpOperationResponse, any)

new RestError(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any)

Parameters

message

string

code

string

statusCode

number

request
WebResourceLike
body

any

Property Details

body

body?: any

Property Value

any

code

code?: string

Property Value

string

PARSE_ERROR

static PARSE_ERROR: string

Property Value

string

request

request?: WebResourceLike

Property Value

REQUEST_ABORTED_ERROR

static REQUEST_ABORTED_ERROR: string

Property Value

string

REQUEST_SEND_ERROR

static REQUEST_SEND_ERROR: string

Property Value

string

response

response?: HttpOperationResponse

Property Value

statusCode

statusCode?: number

Property Value

number

Inherited Property Details

message

message: string

Property Value

string

Inherited From Error.message

name

name: string

Property Value

string

Inherited From Error.name

prepareStackTrace

Optional override for formatting stack traces

See https://v8.dev/docs/stack-trace-api#customizing-stack-traces

static prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Property Value

(err: Error, stackTraces: CallSite[]) => any

Inherited From Error.prepareStackTrace

stack

stack?: string

Property Value

string

Inherited From Error.stack

stackTraceLimit

static stackTraceLimit: number

Property Value

number

Inherited From Error.stackTraceLimit

Inherited Method Details

captureStackTrace(object, Function)

Create .stack property on a target object

static function captureStackTrace(targetObject: object, constructorOpt?: Function)

Parameters

targetObject

object

constructorOpt

Function

Inherited From Error.captureStackTrace