(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
+11
View File
@@ -449,6 +449,17 @@ func (bot *Bot[T]) RunWithContext(ctx context.Context) error {
defer func() {
if r := recover(); r != nil {
bot.logger.Errorln(fmt.Sprintf("panic in update polling: %v", r))
err, ok := r.(error)
if !ok {
err = fmt.Errorf("%v", r)
}
bot.safeEmitEvent(ctx, ErrorEvent{
Plugin: "bot",
HandlerKind: HandlerPollingKind,
HandlerName: "getUpdates",
Err: err,
UserFacing: false,
})
}
close(bot.updateQueue)
}()