{
  "topic": "errors.PRECONDITION_REQUIRED",
  "path": [
    "errors",
    "PRECONDITION_REQUIRED"
  ],
  "title": "PRECONDITION_REQUIRED — PATCH request missing required If-Match header",
  "synopsis": "PATCH applies a merge patch to the entity's stored state rather than replacing it wholesale. Because the patch is applied relative to the current stored data, cyoda-go requires the caller to state a precondition explicitly via `If-Match`. Omitting the header entirely is rejected.",
  "body": "# errors.PRECONDITION_REQUIRED\n\n## NAME\n\nPRECONDITION_REQUIRED — a PATCH request was submitted without an `If-Match` header, which is mandatory for patch operations.\n\n## SYNOPSIS\n\nHTTP: `428` `Precondition Required`. Retryable: `no`.\n\n## DESCRIPTION\n\nPATCH applies a merge patch to the entity's stored state rather than replacing it wholesale. Because the patch is applied relative to the current stored data, cyoda-go requires the caller to state a precondition explicitly via `If-Match`. Omitting the header entirely is rejected.\n\nThis behaviour is specific to PATCH. A PUT without `If-Match` is treated as an unconditional replace and is accepted.\n\nNot retryable as-is — the same request without an `If-Match` header produces the same error.\n\n## RECOVERY\n\nAdd an `If-Match` header to the PATCH request. Two modes are supported:\n\n- **Conditional patch** — supply the `transactionId` obtained from your most recent GET of the entity as the `If-Match` value. The patch is applied only if the entity has not changed since that read; a `412 ENTITY_MODIFIED` is returned if another writer has committed in the meantime.\n- **Unconditional patch (last-writer-wins)** — supply `If-Match: *` to explicitly accept that the patch will be applied to whatever the current stored state is, without a version check.\n\nChoose the conditional form when you need to detect concurrent modifications; choose `*` when you intentionally want last-writer-wins semantics and have already decided the patch is safe to apply regardless of concurrent changes.\n\n## SEE ALSO\n\n- errors\n- errors.ENTITY_MODIFIED\n- errors.BAD_REQUEST\n",
  "sections": [
    {
      "name": "NAME",
      "body": "PRECONDITION_REQUIRED — a PATCH request was submitted without an `If-Match` header, which is mandatory for patch operations."
    },
    {
      "name": "SYNOPSIS",
      "body": "HTTP: `428` `Precondition Required`. Retryable: `no`."
    },
    {
      "name": "DESCRIPTION",
      "body": "PATCH applies a merge patch to the entity's stored state rather than replacing it wholesale. Because the patch is applied relative to the current stored data, cyoda-go requires the caller to state a precondition explicitly via `If-Match`. Omitting the header entirely is rejected.\n\nThis behaviour is specific to PATCH. A PUT without `If-Match` is treated as an unconditional replace and is accepted.\n\nNot retryable as-is — the same request without an `If-Match` header produces the same error."
    },
    {
      "name": "RECOVERY",
      "body": "Add an `If-Match` header to the PATCH request. Two modes are supported:\n\n- **Conditional patch** — supply the `transactionId` obtained from your most recent GET of the entity as the `If-Match` value. The patch is applied only if the entity has not changed since that read; a `412 ENTITY_MODIFIED` is returned if another writer has committed in the meantime.\n- **Unconditional patch (last-writer-wins)** — supply `If-Match: *` to explicitly accept that the patch will be applied to whatever the current stored state is, without a version check.\n\nChoose the conditional form when you need to detect concurrent modifications; choose `*` when you intentionally want last-writer-wins semantics and have already decided the patch is safe to apply regardless of concurrent changes."
    },
    {
      "name": "SEE ALSO",
      "body": "- errors\n- errors.ENTITY_MODIFIED\n- errors.BAD_REQUEST"
    }
  ],
  "see_also": [
    "errors",
    "errors.ENTITY_MODIFIED",
    "errors.BAD_REQUEST"
  ],
  "stability": "stable",
  "actions": []
}
