(new): v1.2 release
Golang lint / lint (push) Successful in 11m32s

This commit is contained in:
2026-08-19 14:58:25 +03:00
parent f03a081ed6
commit 29b208eeec
79 changed files with 7301 additions and 2060 deletions
+23 -2
View File
@@ -14,6 +14,24 @@ var ErrPoolQueueFull = errors.New("worker pool queue full")
// ErrPoolStopped reports that a request was submitted after the worker pool stopped.
var ErrPoolStopped = errors.New("worker pool stopped")
// ErrPoolWorkerPanic reports a panic recovered while executing a worker-pool request.
var ErrPoolWorkerPanic = errors.New("worker pool request panicked")
// ErrResponseTooLarge reports a Telegram API response larger than the safety limit.
var ErrResponseTooLarge = errors.New("telegram API response is too large")
// ErrFileTooLarge reports a file download that exceeds the caller's limit.
var ErrFileTooLarge = errors.New("telegram file exceeds size limit")
// ErrRichJSONDepth reports a rich-message JSON tree deeper than the decoder limit.
var ErrRichJSONDepth = errors.New("rich-message JSON exceeds depth limit")
// ErrRichJSONNodes reports a rich-message JSON tree larger than the decoder limit.
var ErrRichJSONNodes = errors.New("rich-message JSON exceeds node limit")
// ErrRetryLimit reports that a request exhausted its configured 429 retries.
var ErrRetryLimit = errors.New("telegram retry limit reached")
// ErrRichMessageDraftUploadUnsupported reports a direct file upload attempted for a rich draft.
//
// Since: Bot API 10.2
@@ -21,9 +39,12 @@ var ErrRichMessageDraftUploadUnsupported = errors.New("sendRichMessageDraft does
// ResponseError reports an unsuccessful Telegram API response.
type ResponseError struct {
Code int
// Code is the Telegram API error code.
Code int
// Description is the human-readable Telegram API error description.
Description string
Parameters *ResponseParameters
// Parameters contains additional recovery metadata such as retry_after.
Parameters *ResponseParameters
}
// Error returns the Telegram API error code and description.