Skip to content

Commit

Permalink
Merge pull request #123 from formancehq/fix/atlar-retries
Browse files Browse the repository at this point in the history
fix(atlar): retry in case of error when updating tf status
  • Loading branch information
paul-nicolas authored Oct 14, 2024
2 parents a849e77 + e5ca6b1 commit bd40e5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/connectors/internal/connectors/atlar/task_payments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bd40e5e

Please sign in to comment.