quotastack Docs
Docs / API / Errors / validation-error
422

Validation error

https://api.quotastack.io/errors/validation-error

One or more fields in your request were missing or wrong. QuotaStack changed nothing.

Why it happened

  • You left out the Idempotency-Key header on a POST or a PATCH. QuotaStack wants it on every write.
  • A required field was missing from the body.
  • A field held a value QuotaStack does not take, such as an unknown source.
  • You sent two fields that cannot go together, such as expires_at and duration_seconds.

How to fix it

  1. Read the validation_errors array in the reply. Each entry names one field.
  2. Fix that field, then send the request again.
  3. Add the header if the field is Idempotency-Key. Any string you can make again will do.
Example response 422
{
  "type": "https://api.quotastack.io/errors/validation-error",
  "title": "Validation Error",
  "status": 422,
  "detail": "One or more fields failed validation.",
  "validation_errors": [
    {
      "field": "duration_seconds",
      "message": "duration_seconds and expires_at are mutually exclusive",
      "code": "invalid"
    }
  ]
}

Which calls return this

See also