fix: unsilence all error returns from SQL Exec, Bot API calls, and migrations

This commit is contained in:
2026-06-24 20:03:24 +03:30
parent 4165839477
commit e7e4dc7bfe
8 changed files with 227 additions and 193 deletions

View File

@@ -13,7 +13,9 @@ import (
// startWebhook registers the webhook with Telegram and starts the HTTPS/HTTP listener loop.
func startWebhook(ctx context.Context, b *tgbot.Bot, h *bot.Handler, webhookURL string) {
b.DeleteWebhook(ctx, &tgbot.DeleteWebhookParams{})
if _, err := b.DeleteWebhook(ctx, &tgbot.DeleteWebhookParams{}); err != nil {
slog.Warn("failed to delete webhook", "error", err)
}
if _, err := b.SetWebhook(ctx, &tgbot.SetWebhookParams{URL: webhookURL}); err != nil {
slog.Error("set webhook", "error", err)