AjaxError

interface stable

Thrown when an error occurs during an AJAX request. This is only exported because it is useful for checking to see if an error is an instanceof AjaxError. DO NOT create new instances of AjaxError with the constructor.

interface AjaxError extends Error {
  xhr: XMLHttpRequest
  request: AjaxRequest
  status: number
  responseType: XMLHttpRequestResponseType
  response: any
}

Child Interfaces

  • AjaxTimeoutError

Properties

Property Type Description
xhr XMLHttpRequest

The XHR instance associated with the error.

request AjaxRequest

The AjaxRequest associated with the error.

status number

The HTTP status code, if the request has completed. If not, it is set to 0.

responseType XMLHttpRequestResponseType

The responseType (e.g. 'json', 'arraybuffer', or 'xml').

response any

The response data.

See Also

© 2015–2021 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
Code licensed under an Apache-2.0 License. Documentation licensed under CC BY 4.0.
https://rxjs.dev/api/ajax/AjaxError