swepayError Catalog

Common · shared

Validation Failed 400

The request body or parameters failed validation.

type https://errors.swepay.com.br/common/validation-failed

What this means

The request was well-formed but failed validation. One or more fields are missing, have the wrong type, or violate a business rule enforced by the API.

Responses of this type carry an errors extension member: an array of field-level problems so your client can map each violation back to the offending input.

Common causes

  • A required field is missing or empty.
  • A field has the wrong type, format, or is out of range.
  • A value violates a uniqueness or business constraint.

How to resolve

Inspect the errors array and surface the messages next to the relevant fields in your UI. Correct the input and retry — the request is safe to resend once the data is valid. Do not retry unchanged; the result will be identical.

Example response

HTTP 400 · application/problem+json
{
  "type": "https://errors.swepay.com.br/common/validation-failed",
  "title": "Validation Failed",
  "status": 400,
  "detail": "The request contains 2 invalid fields.",
  "instance": "/v1/certificates",
  "errors": [
    {
      "field": "commonName",
      "message": "must be a valid hostname"
    },
    {
      "field": "validityDays",
      "message": "must be between 1 and 825"
    }
  ]
}

References

Machine-readable: /common/validation-failed.json