From e5ca6b1e8ebf4a81e6828df8d89e5ae9c092ebdf Mon Sep 17 00:00:00 2001 From: Paul Nicolas Date: Mon, 14 Oct 2024 09:43:49 +0200 Subject: [PATCH] fix(atlar): add retry when updating payment status --- cmd/connectors/internal/connectors/atlar/task_payments.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/connectors/internal/connectors/atlar/task_payments.go b/cmd/connectors/internal/connectors/atlar/task_payments.go index d9969c89..068a5bc7 100644 --- a/cmd/connectors/internal/connectors/atlar/task_payments.go +++ b/cmd/connectors/internal/connectors/atlar/task_payments.go @@ -199,7 +199,7 @@ func UpdatePaymentStatusTask( ) if err != nil { otel.RecordError(span, err) - return err + return fmt.Errorf("failed to get atlar transfer: %w, %w", err, task.ErrRetryable) } status := getCreditTransferResponse.Payload.Status @@ -370,7 +370,7 @@ func ingestAtlarTransaction( transactionResponse, err := client.GetV1TransactionsID(requestCtx, transactionId) if err != nil { otel.RecordError(span, err) - return err + return fmt.Errorf("failed to get atlar transactions: %w, %w", err, task.ErrRetryable) } batchElement, err := atlarTransactionToPaymentBatchElement(ctx, connectorID, taskID, transactionResponse.Payload, client)