diff --git a/api/gateway/mntx/internal/service/gateway/transfer_notifications.go b/api/gateway/mntx/internal/service/gateway/transfer_notifications.go index f2e1fcb0..5fb6b901 100644 --- a/api/gateway/mntx/internal/service/gateway/transfer_notifications.go +++ b/api/gateway/mntx/internal/service/gateway/transfer_notifications.go @@ -38,7 +38,9 @@ func toOpStatus(t *model.CardPayout) rail.OperationResult { func (p *cardPayoutProcessor) updatePayoutStatus(ctx context.Context, state *model.CardPayout) error { if err := p.store.Payouts().Upsert(ctx, state); err != nil { - p.logger.Warn("Failed to update transfer status", zap.String("transfer_ref", state.PayoutID), zap.String("status", string(state.Status)), zap.Error(err)) + p.logger.Warn("Failed to update transfer status", zap.Error(err), mzap.ObjRef("payout_ref", state.ID), + zap.String("transfer_ref", state.PayoutID), zap.String("status", string(state.Status)), + ) } if isFinalStatus(state) { p.emitTransferStatusEvent(state) diff --git a/api/gateway/mntx/storage/mongo/store/payouts.go b/api/gateway/mntx/storage/mongo/store/payouts.go index 982eec71..c54b823f 100644 --- a/api/gateway/mntx/storage/mongo/store/payouts.go +++ b/api/gateway/mntx/storage/mongo/store/payouts.go @@ -69,6 +69,7 @@ func (p *Payouts) FindByPaymentID(ctx context.Context, paymentID string) (*model func (p *Payouts) Upsert(ctx context.Context, record *model.CardPayout) error { if record == nil { + p.logger.Warn("Invalid argument provided: nil record") return merrors.InvalidArgument("payout record is nil", "record") } @@ -79,6 +80,7 @@ func (p *Payouts) Upsert(ctx context.Context, record *model.CardPayout) error { record.ProviderPaymentID = strings.TrimSpace(record.ProviderPaymentID) if record.OperationRef == "" { + p.logger.Warn("Invalid argument provided: operation reference missing") return merrors.InvalidArgument("operation ref is required", "operation_ref") }