When I try to create a document with a ID which is already present . it throws wrong error saying "The current user is not authorized to perform the requested action." it should actually show. " Document with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID."
NOTE:
- Role is "any" for all collection. so no issue with authorization.
- Authroization error doesn't show up on first time creation of nested object.
- Above is only happening for relationship (nested document) not the direction collection documents.
const testDataSave = async () => { await databases.createDocument(DATABASE_ID, "users_id", "random_doc_id", { basicDetails: { $id: "random_doc_id", name: "randome name", age: 31 }, }); };
does some document exist with that id in the related document?
yes it exists
that may be the duplicate error problem then...does the user have access to the document?
yes user has the access.
collecttion is given the with persmission of any
If you remove the related document from the creation, do you get the error? You'll probably need to include some data or maybe permissions so you don't get a missing data error
Recommended threads
- API key without database.read/write
I had some issues with my previous API key and I deleted it then I wanted to create a new one and discovered the database checkbook has no database.read/write j...
- dynamic key missing scopes for database ...
Here are the scopes listed, I get permission errors for reading row and document. Appears to be missing since last time i checked. Database 6 Scopes policies....
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?