
I am having user cart document with a respective user can read and update permission. Each cart document is 1-1 relationship with user and 1-many realtionship with product documents. When a user removes a product. I am changing the cart products like. this
const removedProductId ="aadfasdfasdf";
db.updateDocument({products: document.products.filter(p => p.$id !== removedProductId)}) //assume dbID, colID, docID is given
If there is single product in a cart. It is removing without throwing an error. otherwise it is saying the current user is not authorized to perform the requested action
.

What are the permissions on all related collections and documents?

Respective user can read and update the document.

Actually It worked fine for sometime

When this error occurs. The realtime connection is closed.

Let's say. there are two product in a cart. If I remove any one of the product the error is thrown saying user is not authorized. but when i remove the single product it is working fine

I think patch request is the suspect. Because updateDocument is taking sometime

What about all related documents?

All authenticated users can read. But no users can update
Recommended threads
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
