I am updating a doc using the SDK and the appwrite console, updating one of the doc is working just fine but another one fails with the following error:
"message": "Server Error",
"code": 500,
"type": "general_unknown",
"version": "0.12.125"
}```
any thoughts?
please make sure to:
- put descriptive titles so that it helps with searching and when looking at the list of posts
- format multiline code with backticks
- include all relevant tags
would you please provide your project id?
500 error when updating document
there's some invalid value in one of your relationship attributes
is there a way to see the logs or to find out which attribute it is?
one of these:
$createdAt: 2024-03-21 04:40:29.824,
$id: 65fbba3dc85bb7284ceb,
$permissions: [],
$updatedAt: 2024-03-21 04:40:29.824,
author: [Filtered],
content: This is my second post,
likes: 0,
masjid: ,
parent: null,
related_masjid: [],
replies: 0,
tags: []
I can't tell much more than that
what's your payload?
here is the update func:
process.env.NEXT_PUBLIC_APPWRITE_DATABASE_ID,
collections.posts,
postId,
{
likes: newLiks
}
);```
I removed the relationships and added it again and it solve the problem. the author attribute had a relationship with the user collection, changing it from author to user (same name as the related collection) fixed it. Does this mean that the relationship attribute should be name exactly the same as the related collection?
Sorry I don't understand
Recommended threads
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this
- ACTIVATE DEPLOYMENT PROBLEM...
It's not giving me the option to activate a deployment that says it's ready..