Package version:

Interface RestError

A custom error type for failed pipeline requests.

interface RestError {
    cause?: unknown;
    code?: string;
    details?: unknown;
    message: string;
    name: string;
    request?: PipelineRequest;
    response?: PipelineResponse;
    stack?: string;
    statusCode?: number;
}

Hierarchy

  • Error
    • RestError
Index
cause?: unknown
code?: string

The code of the error itself (use statics on RestError if possible.)

details?: unknown

Bonus property set by the throw site.

message: string
name: string
request?: PipelineRequest

The request that was made. This property is non-enumerable.

response?: PipelineResponse

The response received (if any.) This property is non-enumerable.

stack?: string
statusCode?: number

The HTTP status code of the request (if applicable.)