Back

[SOLVED] Error 500 if collection has relationship attribute

  • 0
  • Databases
  • Web
  • Cloud
Nikky
3 Oct, 2023, 08:57

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.

TL;DR
There was an error 500 when creating a user document with a relationship attribute to a post collection. The issue was fixed by adding the same permissions to the post collection. No further details or code were provided.
Nikky
3 Oct, 2023, 08:58

Error 500 if collection has relationship attribute

safwan
3 Oct, 2023, 09:20

are you doing this in the console or via an SDK?

safwan
3 Oct, 2023, 09:20

Are you on Cloud or Self-Hosted

Nikky
3 Oct, 2023, 09:20

Hi, I use Cloud

Nikky
3 Oct, 2023, 09:21

Client SDK

safwan
3 Oct, 2023, 09:32

can you show your code?

Nikky
3 Oct, 2023, 09:46

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. πŸ€”

Nikky
3 Oct, 2023, 19:46

Hi @Steven , maybe you have idea on this too? Would really appreaciate it πŸ™

Drake
3 Oct, 2023, 19:48

what's your project id?

Nikky
3 Oct, 2023, 19:50

ProjectId: 651a403634ca830211aa

Drake
3 Oct, 2023, 19:59

would you be able to share an appwrite.json of your collections?

Nikky
3 Oct, 2023, 20:28

Hey @Steven Would screenshots of my collection's attributes work?

D5
3 Oct, 2023, 20:38

If you're not using CLI, I think it will be fine

Nikky
3 Oct, 2023, 20:48

Created the collections using cloud. πŸ™

Drake
3 Oct, 2023, 21:02

Sorry the details would be really helpful to help us try to recreate it exactly as you have it.

Nikky
3 Oct, 2023, 21:06

Oh I created these manually in Cloud. I only use client SDK. For permissions I set any and checked all boxes for now.

Nikky
3 Oct, 2023, 21:08

Oh hey @Steven , I tested again just now. Seems like this is now fixed.

D5
3 Oct, 2023, 21:12

Did you have modified anything?

Nikky
3 Oct, 2023, 21:14

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.

Nikky
3 Oct, 2023, 21:22

Really apprecite the help here guys. Thank you! Can mark this as solved. πŸ™

Nikky
3 Oct, 2023, 21:22

[SOLVED] Error 500 if collection has relationship attribute

Nikky
3 Oct, 2023, 21:32

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..

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more