RestError class
- Extends
-
Error
Constructors
Rest |
Properties
body | |
code | |
PARSE_ERROR | |
request | |
REQUEST_ABORTED_ERROR | |
REQUEST_SEND_ERROR | |
response | |
status |
Inherited Properties
message | |
name | |
prepare |
Optional override for formatting stack traces See https://v8.dev/docs/stack-trace-api#customizing-stack-traces |
stack | |
stack |
Inherited Methods
capture |
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
- response
- HttpOperationResponse
- 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_ABORTED_ERROR
static REQUEST_ABORTED_ERROR: string
Property Value
string
REQUEST_SEND_ERROR
static REQUEST_SEND_ERROR: string
Property Value
string
response
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