Error in inside a function: The document data and permissions are missing
- 0
- Self Hosted
- Functions
I'm trying to update a document in a function with this code:
const document_data = {
tipo: data.markin.type,
updated_at: DateTime.now().toISO(),
};
const marking = await databases_user.updateDocument(
DB_RH,
C_MARKIN,
data.marking.$id,
document_data
);
The functions fails with the error: AppwriteException: The document data and permissions are missing. You must provide either document data or permissions to be updated.
So I logged document_data and I see the data is there before I send it with updateDocument
Then I have replaced the databases.php in the appwrite source code to add some debug logs, I can see the following information when the request is make:
appwrite | string(2) "db" // $databaseId
appwrite | string(10) "collection" // $collectionId
appwrite | string(2) "id" // $documentId
appwrite | array(0) { // $data
appwrite | }
appwrite | NULL // $permissions
So seems like the problem is the SDK not sending the data. But when I try the same function running it with the CLI it works without problem
I'm using:
appwrite 1.6.0node-appwrite 14.1.0bun 1.0
What can be happening?
Recommended threads
- Selfhost - Starting Docker containers fa...
I am stuck at installing appwrite. Specifically, the containers dont want to start up. The images are downloaded and ready. Dockhand is reporting containers st...
- It says domain already used but I have d...
I accidentally deleted the project in which I used my domain originally (orexia.app) from name.com. Now I am trying to add it to a different project and it says...
- Is this normal in the self host custom d...
when i try to add custom domain to the project did not see this in 1.8.0 ok when pressed the retry it says "DNS verification failed with resolver 8.8.8.8. Domai...