Error: precondition_failed

A required precondition was not satisfied before the operation could execute.

precondition_failed

HTTP status: 412

The operation requires a condition to be true that is currently false. The detail field describes the specific precondition that failed.

Why this happens

  • Attempting to issue a quote before a prequalify has been run for the same applicant.
  • Attempting to send a document for signing before the case is in a signable state.
  • Operating on a resource that depends on another resource that does not yet exist.

What to do

  1. Read the detail field — it describes the exact precondition that failed and often names the prerequisite operation.
  2. Complete the prerequisite operation first (e.g., run prequalify before quote).
  3. Retry the original operation after the prerequisite completes.

Example response

{
  "type": "https://zyins.isaapi.com/errors/precondition-failed",
  "title": "Precondition failed",
  "status": 412,
  "detail": "A prequalify must be run for this applicant before requesting a quote. Call POST /v2/prequalify first.",
  "code": "precondition_failed",
  "advice_code": "run_prerequisite",
  "param": null,
  "request_id": "req_01HZK2N5GQR9T8X4B6FJW3Y1AS"
}

SDK exceptions

LanguageException class
TypeScriptIsaPreconditionFailedError
PythonIsaPreconditionFailedError
Go*zyins.PreconditionFailedError
PHPIsa\Sdk\Zyins\Exception\IsaPreconditionFailedException
C#IsaPreconditionFailedException

See also