From 5c33f20d82a865cc684f31f0d3e3a946c96972fc Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Fri, 13 Feb 2026 12:45:23 +0100 Subject: [PATCH] Wrap errors Signed-off-by: Sacha Al Himdani --- pkg/webhook/sender.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/webhook/sender.go b/pkg/webhook/sender.go index 80a196e2d..8e0238ca7 100644 --- a/pkg/webhook/sender.go +++ b/pkg/webhook/sender.go @@ -101,7 +101,7 @@ func (s *Sender) processEvents(ctx context.Context) error { if errors.Is(err, coredata.ErrResourceNotFound) { return nil } - return err + return fmt.Errorf("cannot claim next webhook data: %w", err) } s.processWebhookData(ctx, webhookData) @@ -113,7 +113,7 @@ func (s *Sender) claimNextWebhookData(ctx context.Context) (*coredata.WebhookDat err := s.pg.WithTx(ctx, func(tx pg.Conn) error { if err := webhookData.LoadNextPendingForUpdate(ctx, tx); err != nil { - return err + return fmt.Errorf("cannot load next pending webhook data: %w", err) } scope := coredata.NewScopeFromObjectID(webhookData.ID)