Skip to content
Back

unique ID error message when document with same attribute is created

  • 0
  • Cloud
Grahf
10 Mar, 2025, 19:10

Hi. I get this error: AppwriteException: Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.

When I try to create a document that has the same name attribute as an existing document. I have this index setup (screenshot). It prevents documents from being created with the same name.... Shouldn't the error message say I'm trying to create a document with the same name as an existing document instead of it saying I'm trying to use the same ID?

TL;DR
Error message says document ID already exists, but the issue is with the name attribute. Need to modify the error message for accuracy.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more