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
- Intermittent 60s edge-to-origin stalls r...
Anyone having this problem? Region: SFO. Plan: Pro. UPDATE: "Fastly's documentation notes that enabling origin shielding can resolve backend connection problem...
- Vulnerabilities !!!
Why i can't mail to security@appwrite.io
- [Solved] Appwrite project paused
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...