extended logging
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user