extended logging

This commit is contained in:
Stephan D
2026-02-10 11:14:02 +01:00
parent 9463c7ce1f
commit 3578ddd54f
2 changed files with 5 additions and 1 deletions

View File

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