diff --git a/webhook.go b/webhook.go index 13e99bc..5a48d6c 100644 --- a/webhook.go +++ b/webhook.go @@ -119,7 +119,7 @@ func (h *Webhook) getParams() map[string]string { func (h *Webhook) Poll(b *Bot, dest chan Update, stop chan struct{}) { if err := b.SetWebhook(h); err != nil { - b.debug(err) + b.OnError(err, nil) close(stop) return }