Back

Requested ID already exists

  • 0
  • Web
dikshatiwari
5 Mar, 2024, 05:44

I am trying to create a blog application using react as frontend and appwrite as backend service. I can add or create one post but when i try to add second post i got error

  1. appwrite.js?v=ccfb24fa:850 Uncaught (in promise) AppwriteException: Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID. at Client. I have tried using ID.unique() but got the same error. Can anyone please help me solve this issue.
TL;DR
Developers are passing slug as ID, causing the error "Document with the requested ID already exists." Suggestion to post a picture of the document in the Appwrite console. Further info needed: Appwrite version and SDK version. The error can be resolved by generating a unique ID using ID.unique() or manually ensuring unique IDs when creating posts in the blog application.
darShan
5 Mar, 2024, 05:51

Can you share the appwrite version and sdk version?

mxood
5 Mar, 2024, 05:56

im new here but looks like youre passing slug as id, maybe for others can you post picture of the document in appwrite cosole aswell

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