RestError class
- Extends
-
Error
建構函式
Rest |
屬性
body | |
code | |
PARSE_ERROR | |
request | |
REQUEST_ABORTED_ERROR | |
REQUEST_SEND_ERROR | |
response | |
status |
繼承的屬性
message | |
name | |
prepare |
格式化堆疊追蹤的選擇性覆寫 請參閱https://v8.dev/docs/stack-trace-api#customizing-stack-traces |
stack | |
stack |
繼承的方法
capture |
在目標物件上建立 .stack 屬性 |
建構函式詳細資料
RestError(string, string, number, WebResourceLike, HttpOperationResponse, any)
new RestError(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any)
參數
- message
-
string
- code
-
string
- statusCode
-
number
- request
- WebResourceLike
- response
- HttpOperationResponse
- body
-
any
屬性詳細資料
body
body?: any
屬性值
any
code
code?: string
屬性值
string
PARSE_ERROR
static PARSE_ERROR: string
屬性值
string
request
REQUEST_ABORTED_ERROR
static REQUEST_ABORTED_ERROR: string
屬性值
string
REQUEST_SEND_ERROR
static REQUEST_SEND_ERROR: string
屬性值
string
response
statusCode
statusCode?: number
屬性值
number
繼承的屬性詳細資料
message
message: string
屬性值
string
繼承自 Error.message
name
name: string
屬性值
string
繼承自 Error.name
prepareStackTrace
格式化堆疊追蹤的選擇性覆寫
請參閱https://v8.dev/docs/stack-trace-api#customizing-stack-traces
static prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any
屬性值
(err: Error, stackTraces: CallSite[]) => any
繼承自 Error.prepareStackTrace
stack
stack?: string
屬性值
string
繼承自 Error.stack
stackTraceLimit
static stackTraceLimit: number
屬性值
number
繼承自 Error.stackTraceLimit
繼承的方法的詳細資料
captureStackTrace(object, Function)
在目標物件上建立 .stack 屬性
static function captureStackTrace(targetObject: object, constructorOpt?: Function)
參數
- targetObject
-
object
- constructorOpt
-
Function
繼承自 Error.captureStackTrace