Skip to main content
General·HTTP 412·API

Precondition failed

precondition_failed

The request carried a condition (an If-Match or If-None-Match header) and the resource no longer meets it.

What this means​

The resource changed after you last read it, so the version your request names is not the current one.

How to fix it​

Read the resource again, apply your change to the current version, and send the request with the new version in the header.

Retry behavior​

Retry after reading the resource again. The same header gets the same answer.

How it appears in the response​

ComputeSphere returns errors as RFC 7807 Problem Details. The type field is the docs URL for this page — switch on code in your client.

{
"type": "https://docs.computesphere.com/errors/precondition_failed",
"title": "Precondition failed",
"status": 412,
"code": "precondition_failed",
"detail": "The request carried a condition (an If-Match or If-None-Match header) and the resource no longer meets it.",
"instance": "/v2/…",
"request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"trace_id": null
}

The Content-Type header is application/problem+json. On field-level validation errors a non-empty errors[] array also appears, each entry carrying its own docs_url for the offending field.