(new): webhook + payload error sentinels
Golang lint / lint (push) Successful in 2m46s
Golang lint / lint (pull_request) Successful in 2m47s

(fix): polling panic ErrorEvent, nil-logger guard
  (refactor): inline webhook errors → sentinels, dead Runner branch
  (doc): Runner godoc, Error godoc, drafts cleanup
This commit is contained in:
2026-05-20 12:30:44 +03:00
parent 61d0b1ebb8
commit 8a3f2cedf2
9 changed files with 81 additions and 59 deletions
+16
View File
@@ -73,6 +73,22 @@ var (
ErrBotUploaderWhenCertificate = errors.New("bot uploader nil, but certificate set")
// ErrStatusPathSecretRequired reports that UseStatusPath requires SecretToken to be set.
ErrStatusPathSecretRequired = errors.New("SecretToken required when UseStatusPath is enabled")
// ErrSetWebhookFailed reports that Telegram rejected the setWebhook request.
ErrSetWebhookFailed = errors.New("failed to set webhook")
// ErrBotAPINil reports that an operation requires an API client but none is set.
ErrBotAPINil = errors.New("bot api is nil")
// ErrBotWebhookOptsEmptyPath reports that BotWebhookOpts.Path is empty.
ErrBotWebhookOptsEmptyPath = errors.New("empty BotWebhookOpts.Path")
// ErrBotWebhookOptsPathNoSlash reports that BotWebhookOpts.Path does not start with '/'.
ErrBotWebhookOptsPathNoSlash = errors.New("BotWebhookOpts.Path must start with '/'")
// ErrBotWebhookOptsPathHasQueryOrFragment reports that BotWebhookOpts.Path contains a query or fragment.
ErrBotWebhookOptsPathHasQueryOrFragment = errors.New("BotWebhookOpts.Path must not contain query or fragment")
// ErrBotWebhookOptsPathCollidesStatus reports that BotWebhookOpts.Path collides with the reserved /status endpoint.
ErrBotWebhookOptsPathCollidesStatus = errors.New("BotWebhookOpts.Path must not be '/status' when status path is enabled")
// ErrBotWebhookTLSFilesIncomplete reports that only one of the two TLS files was provided.
ErrBotWebhookTLSFilesIncomplete = errors.New("you must specify both private and public keys")
// ErrBotWebhookTLSFilesTooMany reports that more than two TLS files were provided.
ErrBotWebhookTLSFilesTooMany = errors.New("too many files; you must specify only private and public keys")
)
func validateMessageText(text string) error {