Skip to content

Already exists

already_existsHTTP 409Retrying the same request will not help

The command would create something that is already there.

Why it happens

  • A create command for an id, name or other unique value that is taken.

What to do

  • Read the existing item instead, or choose another value.

What it looks like

Inside a batch, the operation's frame carries it:

json
{
  "id": 1,
  "error": {
    "code": "already_exists",
    "message": "A user named ada already exists"
  },
  "fin": true
}

When the whole request is refused over HTTP, the answer is a problem document:

json
{
  "type": "https://eddyboutros.github.io/rayfold/errors/already_exists",
  "title": "already exists",
  "status": 409,
  "detail": "A user named ada already exists",
  "code": "already_exists"
}

See also all error types and the errors chapter of the specification.

Released under the Apache-2.0 license.