Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/core/error.ts>HttpError

The Telegram Bot Framework.
Very Popular
Latest
class HttpError
extends Error
import { HttpError } from "https://deno.land/x/grammy@v1.32.0/core/error.ts";

This class represents errors that are thrown by grammY because an HTTP call to the Telegram Bot API failed.

Instances of this class hold the error object that was created because the fetch call failed. It can be inspected to determine why exactly the network request failed.

If an API transformer function throws an error, grammY will regard this as if the network request failed. The contained error will then be the error that was thrown by the transformer function.

Constructors

new
HttpError(message: string, error: unknown)