Compartir a través de


RestError class

Extends

Error

Constructores

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

Propiedades

body
code
PARSE_ERROR
request
REQUEST_ABORTED_ERROR
REQUEST_SEND_ERROR
response
statusCode

Propiedades heredadas

message
name
prepareStackTrace

Invalidación opcional para dar formato a los seguimientos de la pila

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

stack
stackTraceLimit

Métodos heredados

captureStackTrace(object, Function)

Creación de una propiedad .stack en un objeto de destino

Detalles del constructor

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

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

Parámetros

message

string

code

string

statusCode

number

request
WebResourceLike
body

any

Detalles de las propiedades

body

body?: any

Valor de propiedad

any

code

code?: string

Valor de propiedad

string

PARSE_ERROR

static PARSE_ERROR: string

Valor de propiedad

string

request

request?: WebResourceLike

Valor de propiedad

REQUEST_ABORTED_ERROR

static REQUEST_ABORTED_ERROR: string

Valor de propiedad

string

REQUEST_SEND_ERROR

static REQUEST_SEND_ERROR: string

Valor de propiedad

string

response

response?: HttpOperationResponse

Valor de propiedad

statusCode

statusCode?: number

Valor de propiedad

number

Detalles de las propiedades heredadas

message

message: string

Valor de propiedad

string

Heredado de Error.message

name

name: string

Valor de propiedad

string

Heredado de Error.name

prepareStackTrace

Invalidación opcional para dar formato a los seguimientos de la pila

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

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

Valor de propiedad

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

Heredado de Error.prepareStackTrace

stack

stack?: string

Valor de propiedad

string

Heredado de Error.stack

stackTraceLimit

static stackTraceLimit: number

Valor de propiedad

number

Heredado de Error.stackTraceLimit

Detalles de los métodos heredados

captureStackTrace(object, Function)

Creación de una propiedad .stack en un objeto de destino

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

Parámetros

targetObject

object

constructorOpt

Function

Heredado de Error.captureStackTrace