ALREADY_EXISTS API Origin: Application & API Last updated 14 Oct 2026

API Error: Resource already exists (ALREADY_EXISTS / resource_already_exists / 409)

The create request was refused because an object with the same unique identity — name, email, external ID — already exists.

Exact message you may see Resource already existsalready exists (409)
Seen on: REST API

Meaning

Most APIs enforce uniqueness on some field. gRPC and Google Cloud APIs return status ALREADY_EXISTS, others resource_already_exists, duplicate_resource or a plain 409 Conflict with “already exists”.

It very often happens on retries: the first create actually succeeded but the response was lost (timeout), so the client tried again.

Common causes

  • An object with the same unique key really exists
  • A timed-out create succeeded and the retry duplicates it
  • Two workers created the same object concurrently
  • Soft-deleted object still reserves the name

⚡ Quick fix

  1. Look up the existing object and use it (get-or-create)
  2. Use an idempotency key so retries return the original result
  3. Choose a different unique value if it’s a genuine clash

Detailed fix by platform

Node.js

  1. `try { await api.create({ name }); } catch (e) { if (e.status === 409
  2. e.code === 'ALREADY_EXISTS') return api.getByName(name); throw e; }`

gcloud

  1. `gcloud pubsub topics describe my-topic
  2. gcloud pubsub topics create my-topic # create only if missing`

How to diagnose

  1. Search — Does an object with that key exist already?
  2. Retries — Did an earlier attempt time out?
  3. Concurrency — Multiple creators?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

1022 — MySQL ERROR 1022 (23000): Can't write; duplicate key in table (MySQL)10221048 — MySQL ERROR 1048 (23000): Column 'x' cannot be null (MySQL)10481062 — MySQL ERROR 1062 (23000): Duplicate entry for key (MySQL)10621451 — MySQL ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (MySQL)14511452 — MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails (MySQL)145223503 — ERROR: insert or update on table "x" violates foreign key constraint "fk" — Key (user_id)=(5) is not present in table "users" (PostgreSQL)2350323503 parent — ERROR: update or delete on table "users" violates foreign key constraint on table "orders" — Key (id)=(5) is still referenced (PostgreSQL)23503 parent23505 — PostgreSQL: ERROR: duplicate key value violates unique constraint (PostgreSQL)23505ALREADY_E…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.