better message formatting
Some checks failed
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful

This commit is contained in:
Stephan D
2025-11-19 13:54:25 +01:00
parent 62956b06ca
commit 717dafc673
26 changed files with 202 additions and 56 deletions

View File

@@ -32,22 +32,22 @@ func (dr *DemoRequest) Normalize() {
// Validate ensures that all required fields are present.
func (dr *DemoRequest) Validate() error {
if dr == nil {
return merrors.InvalidArgument("request payload is empty")
return merrors.InvalidArgument("request payload is empty", "request")
}
if dr.Name == "" {
return merrors.InvalidArgument("name must not be empty")
return merrors.InvalidArgument("name must not be empty", "request.name")
}
if dr.OrganizationName == "" {
return merrors.InvalidArgument("organization name must not be empty")
return merrors.InvalidArgument("organization name must not be empty", "request.organizationName")
}
if dr.Phone == "" {
return merrors.InvalidArgument("phone must not be empty")
return merrors.InvalidArgument("phone must not be empty", "request.phone")
}
if dr.WorkEmail == "" {
return merrors.InvalidArgument("work email must not be empty")
return merrors.InvalidArgument("work email must not be empty", "request.workEmail")
}
if dr.PayoutVolume == "" {
return merrors.InvalidArgument("payout volume must not be empty")
return merrors.InvalidArgument("payout volume must not be empty", "request.payoutVolume")
}
return nil
}