Request contract unverified
The answer a preview environment’s own address gives when it refuses requests that break its OpenAPI contract and could not decide whether a request does.
| Field | Value |
|---|---|
type |
https://mockhub.dev/problems/request-contract-unverified |
| Status | 503 |
What it means
Section titled “What it means”The environment is in Reject mode and never serves a request it has not checked. This one could not be checked, so it was not served. It is no verdict on the request: it may be fine. Nothing else happened: no mock matched, no scenario moved and no data store write ran.
Status
Section titled “Status”Always 503, with Retry-After: 5.
Where it comes from
Section titled “Where it comes from”Only from the address of an ephemeral project in Reject mode.
| When | reason |
|---|---|
| No operation of the contract answers the request, and the environment checks every operation | operation-unresolved |
| A part of the request cannot be decided, such as a body type that is not JSON, text or form data | The code of the part, such as request-media-type-unsupported |
| The check ran out of time or the document is too large for the gateway | request-budget-exhausted, request-document-too-large |
| The environment no longer meets what Reject needs: the plan no longer includes it, or the pinned revision was removed | request-enforcement-unavailable |
The body adds contractRevision and reason.
{ "type": "https://mockhub.dev/problems/request-contract-unverified", "title": "Request could not be checked", "status": 503, "detail": "The request could not be checked against the project's OpenAPI contract, so it was not served. This is no verdict on the request.", "contractRevision": 2, "reason": "operation-unresolved"}What to do
Section titled “What to do”Read the reason. For a request no operation answers, send one the contract describes. For an operation a check cannot decide, narrow the operations the environment checks to the ones it can. For request-enforcement-unavailable, restore what is missing or set the mode to Off or Report: the environment never serves unchecked requests while it is set to refuse.
Related
Section titled “Related”- Request contract invalid, when the request breaks the contract
- Refuse invalid requests in a preview environment
- Error types