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.
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
- Look up the existing object and use it (get-or-create)
- Use an idempotency key so retries return the original result
- Choose a different unique value if it’s a genuine clash
Detailed fix by platform
Node.js
- `try { await api.create({ name }); } catch (e) { if (e.status === 409
- e.code === 'ALREADY_EXISTS') return api.getByName(name); throw e; }`
gcloud
- `gcloud pubsub topics describe my-topic
- gcloud pubsub topics create my-topic # create only if missing`
How to diagnose
- Search — Does an object with that key exist already?
- Retries — Did an earlier attempt time out?
- Concurrency — Multiple creators?
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026