Wrap errors

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-02-13 12:45:23 +01:00
parent 9cc6f2afc2
commit 5c33f20d82

View File

@@ -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)