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
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- IMPORTANT! SOC-2 Request Failing
Issue requesting SOC-2. If tried other/private browser as well as filling in optional fields.