{
  "topic": "errors.UNIQUE_VIOLATION",
  "path": [
    "errors",
    "UNIQUE_VIOLATION"
  ],
  "title": "UNIQUE_VIOLATION — composite unique key constraint violated",
  "synopsis": "The entity payload contains field values that collide with an existing entity's composite unique key. Unlike an optimistic-concurrency CONFLICT (which is retryable), a unique-key violation is a permanent data constraint — retrying the same payload without changing the key field values will produce the same result.",
  "body": "# errors.UNIQUE_VIOLATION\n\n## NAME\n\nUNIQUE_VIOLATION — a write was rejected because it would create a duplicate entry for a declared composite unique key.\n\n## SYNOPSIS\n\nHTTP: `409` `Conflict`. Retryable: `no`.\n\n## DESCRIPTION\n\nThe entity payload contains field values that collide with an existing entity's composite unique key. Unlike an optimistic-concurrency CONFLICT (which is retryable), a unique-key violation is a permanent data constraint — retrying the same payload without changing the key field values will produce the same result.\n\nTo resolve: change the values of the fields that form the unique key so they no longer duplicate an existing entity.\n\nOn write-time backends (PostgreSQL) this can also fire within one transaction when a value is claimed before its holder is freed; free-before-claim is portable (see `cyoda help models`).\n\n## SEE ALSO\n\n- errors\n- errors.CONFLICT\n- errors.INVALID_UNIQUE_KEY\n",
  "sections": [
    {
      "name": "NAME",
      "body": "UNIQUE_VIOLATION — a write was rejected because it would create a duplicate entry for a declared composite unique key."
    },
    {
      "name": "SYNOPSIS",
      "body": "HTTP: `409` `Conflict`. Retryable: `no`."
    },
    {
      "name": "DESCRIPTION",
      "body": "The entity payload contains field values that collide with an existing entity's composite unique key. Unlike an optimistic-concurrency CONFLICT (which is retryable), a unique-key violation is a permanent data constraint — retrying the same payload without changing the key field values will produce the same result.\n\nTo resolve: change the values of the fields that form the unique key so they no longer duplicate an existing entity.\n\nOn write-time backends (PostgreSQL) this can also fire within one transaction when a value is claimed before its holder is freed; free-before-claim is portable (see `cyoda help models`)."
    },
    {
      "name": "SEE ALSO",
      "body": "- errors\n- errors.CONFLICT\n- errors.INVALID_UNIQUE_KEY"
    }
  ],
  "see_also": [
    "errors",
    "errors.CONFLICT",
    "errors.INVALID_UNIQUE_KEY"
  ],
  "stability": "stable",
  "actions": []
}
