appwrite
appwrite copied to clipboard
🚀 Feature: Database - Return attribute or index name on 409 error (document_already_exists)
🔖 Feature description
When a user tries to create a document that violates a unique type index, return the name of the index or attribute that it violates.
Current:
{
"code": "document_already_exists",
"message": "Document already exists"
}
New:
{
"code": "document_already_exists",
"message": "Document already exists: document violates type unique for index 'index_name'"
}
🎤 Pitch
If you have a website where users can store items with multiple unique attributes, it would be nice to tell the user which input should be fixed.
👀 Have you spent some time to check if this issue has been raised before?
- [x] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
Thank you for raising this issue! 🙏 I'll be sure to pass this feedback to the team!