Class ApiError

Represents an error response from the API when the status code is not 200.

Hierarchy

  • Error
    • ApiError

Constructors

Properties

Accessors

Constructors

  • Constructs an error from the given response and reason.

    Parameters

    • response: Response

      The original response

    • detail: string

      The error message from the API.

    Returns ApiError

Properties

cause?: unknown
message: string
name: string
response: Response

The original response object.

stack?: string

Accessors

  • get status(): number
  • Get the status code of this error.

    Returns number

  • get statusText(): string
  • Get the status message of this error.

    Returns string