GrammyError
This class represents errors that are thrown by grammY because the Telegram Bot API responded with an error.
Instances of this class hold the information that the Telegram backend returned.
If this error is thrown, grammY could successfully communicate with the Telegram Bot API servers, however, an error code was returned for the respective method call.
Extends
Implements
Constructors
GrammyError(
message: string,
err: ApiError,
method: string,
payload: Record<string, unknown>,
);
Properties
ok
readonly ok: false;
Flag that this request was unsuccessful. Always false
.
error_code
readonly error_code: number;
An integer holding Telegram’s error code. Subject to change.
description
readonly description: string;
A human-readable description of the error.
parameters
readonly parameters: ResponseParameters;
Further parameters that may help to automatically handle the error.
method
readonly method: string;
payload
readonly payload: Record<string, unknown>;