From 22aa16e9574c70d3c0670472c356fc6ade8af691 Mon Sep 17 00:00:00 2001 From: Adora Laura Kalb Date: Tue, 5 Nov 2024 11:57:45 +0100 Subject: [PATCH] fix: error handling was missing --- app/queue.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/queue.go b/app/queue.go index 49af633..ba3ae4a 100644 --- a/app/queue.go +++ b/app/queue.go @@ -7,10 +7,11 @@ package app import ( - "codeberg.org/lauralani/humble-bot/db" - "codeberg.org/lauralani/humble-bot/models" "context" "database/sql" + + "codeberg.org/lauralani/humble-bot/db" + "codeberg.org/lauralani/humble-bot/models" "github.com/rs/zerolog/log" ) @@ -35,8 +36,11 @@ func RunSingleQueueItem() { err = postQueueItemToMastodon(item) if err != nil { + log.Error().Str("bundle-name", item.Name).Int64("bundle-id", item.ID). + Str("bundle-url", item.URL).Msg("failed to post new bundle!") return } + log.Debug().Str("func", "RunSingleQueueItem").Str("item", item.Name). Msg("posted to mastodon")