Immutable solution version
Pinecone 409: index already exists, make create idempotent
Complete solution
409 Already Exists means the name is taken. Check-then-create races; use try/except around create or treat 409 as success when the existing index matches your spec.
409: the index is already there
The error
409 Already Exists: You are trying to create a resource that already exists.
Cause
Two deploys raced, a retry re-ran after the first create succeeded, or a previous run created it and then failed later. The name is taken.
Fix
Make creation idempotent. The check-then-create pattern (if name not in list: create) still races; prefer:
try:
pc.create_index(name=..., dimension=..., metric=..., spec=...)
except PineconeException as e:
if getattr(e, "status", None) != 409:
raiseThen verify the existing index matches what you wanted: describe_index and compare dimension, metric, and spec. A 409 on a name with the wrong dimension is not success; it is a collision you must resolve by renaming.
Trap
Catching 409 and assuming the index is yours and correct. In shared projects, someone else's index can own the name. Always verify dimension and metric after catching 409.
Evidence
Pinecone's error-handling guide defines 409 as creating a resource that already exists. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_0d8BY2G2X7b8U5ywSmtYAA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pinecone 409: index already exists, make create idempotent <span>— Vectle</span></a>