I have a user collection and added a relationship attribute with post collection. When I tried creating user document, the document was created but it throws server error. When I removed the relationship attribute and tried again it now stops sending back server error.
Error 500 if collection has relationship attribute
are you doing this in the console or via an SDK?
Are you on Cloud or Self-Hosted
Hi, I use Cloud
Client SDK
can you show your code?
Sure... here we go. So It creates the document but it returns error whenever I have user->post collection relationship attribute in my user collection. π€
Hi @Steven , maybe you have idea on this too? Would really appreaciate it π
what's your project id?
ProjectId: 651a403634ca830211aa
would you be able to share an appwrite.json of your collections?
Hey @Steven Would screenshots of my collection's attributes work?
If you're not using CLI, I think it will be fine
Created the collections using cloud. π
Sorry the details would be really helpful to help us try to recreate it exactly as you have it.
Oh I created these manually in Cloud. I only use client SDK. For permissions I set any and checked all boxes for now.
Oh hey @Steven , I tested again just now. Seems like this is now fixed.
Did you have modified anything?
Nope I didnt. It just worked suddenly now. My last touch was a few housr ago and I just remove and add again the relationship attribute and tested but it was still sending the error that time. Not sure what happen. But it works now.
Really apprecite the help here guys. Thank you! Can mark this as solved. π
[SOLVED] Error 500 if collection has relationship attribute
Oh I just remember, a few minutes before I tested this again, I added the same permissions to post collection which - fixed another issue. Maybe that fixed this too..
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.