Documentation

Internal server error

The generated server encountered an internal contract failure, such as an unavailable schema validator or a Rust type that cannot decode a schema-valid value.

Last reviewed October 27, 2026

Problem identity

HTTP status: 500. Stable code: generated_contract_error.

Type URI: https://openapi-to-rust.dev/problems/generated-contract-error.

How to respond

Report the failure to the service owner. Owners should check server diagnostics and regenerate from the current OpenAPI document; changing client input is not the expected fix.

Example response

The response uses application/problem+json. This is an illustrative body; individual violations depend on the request.

Response body json
{
  "type": "https://openapi-to-rust.dev/problems/generated-contract-error",
  "title": "Internal server error",
  "status": 500,
  "code": "generated_contract_error"
}

Error fields

type identifies the problem category, title summarizes it, status mirrors the HTTP status, and code is a stable machine-readable label. The optional errors array contains sanitized code, location, and message fields. Empty arrays are omitted.

Locations are JSON Pointers rooted at /body, /path, /query, /header, or /cookie. Violations are deduplicated, capped (16 by default), then sorted. Messages omit submitted values and internal diagnostics.

Clients can use the type URI as an identifier without fetching this page for every error. See RFC 9457, section 3.1.1.

Related documentation