Hello,
While testing a function that updates references in a database, my database got erased with no warning or indication.
Here is a Gist of the function that I executed: https://gist.github.com/t0mm4rx/c38e6c1116d3c2e4b4ea40a0b18899cf
Logs of the appwrite
container are included. You can see that the issue happened before the Database not found
exception.
The function has never called deleteDatabase
.
- This is a pretty severe bug that should be fixed
- Any way I can retrieve my data?
Maybe it's linked to this line:
await database.deleteDocument(
'645e69708e42a5f150cd',
'',
sourcePrice.$id,
);
where I called deleteDocument
without specifying a collection.
Maybe you can test on your side?
I hope this will be fixed soon, I was about to ship this function in production would have been very painful
For now you can reuse your collectionId here : https://gist.github.com/t0mm4rx/c38e6c1116d3c2e4b4ea40a0b18899cf#file-index-js-L54
I suggest you create an issue on github
Yes great idea
Done
Yes, this is the problem. Why would you leave it blank?
Forgot to fill it while copy / pasting previous code.
I see. We're working on this. See https://github.com/appwrite/appwrite/issues/5310
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Appwrite exception: user_unauthorized, t...
After refreshing the app it is working perfectly