Class HTTPResponseError

Represents an HTTP response error received from Telegram API. Extends the base TelegramError class to include specific details about the error response.

Hierarchy

  • Error
    • HTTPResponseError

Constructors

Properties

code: string | number
description: string
message: string
name: string
parameters: undefined | {
    migrate_to_chat_id?: number;
    retry_after?: number;
}
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Accessors

  • get headers(): null | Headers
  • The headers of the HTTP response.

    Returns null | Headers

    The response headers, or null if not available.

  • get status(): null | number
  • The HTTP status code of the response.

    Returns null | number

    The HTTP status code, or null if not available.

  • get statusText(): null | string
  • The status text of the HTTP response.

    Returns null | string

    The status text, or null if not available.

  • get url(): null | string
  • The URL of the request that caused the error.

    Returns null | string

    The URL of the request, or null if not available.

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void