Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpErrorResponse

A response that represents an error or failure, either from a non-successful HTTP status, an error while executing the request, or some other failure which occurred during the parsing of the response.

Any error returned on the Observable response stream will be wrapped in an HttpErrorResponse to provide additional context about the state of the HTTP layer when the error occurred. The error property will contain either a wrapped Error object or the error response returned from the server.

Hierarchy

Implements

  • Error

Index

Constructors

constructor

  • new HttpErrorResponse(init: { error?: any; headers?: HttpHeaders; status?: number; statusText?: string; url?: string }): HttpErrorResponse

Properties

Readonly error

error: any | null

Readonly headers

headers: HttpHeaders

All response headers.

Readonly message

message: string

Readonly name

name: "HttpErrorResponse" = "HttpErrorResponse"

Readonly ok

ok: false = false

Errors are never okay, even when the status code is in the 2xx success range.

Readonly status

status: number

Response status code.

Readonly statusText

statusText: string

Textual description of response status code.

Do not depend on this.

Readonly type

Type of the response, narrowed to either the full response or the header.

Readonly url

url: string | null

URL of the resource retrieved, or null if not available.

Generated using TypeDoc