Back

[SOLVED] 500 error when creating a document

  • 0
  • Cloud
Said H
27 Sep, 2023, 02:46

Hello, I'm not sure whether this is related to maintenance because I can't create documents in one collection, but I can do so in another collection of the same database.

TL;DR
User is experiencing a 500 error when trying to create a document in a specific collection. They are unsure if it is related to maintenance or an issue with their data. The issue is solved by editing the enum attribute.
Drake
27 Sep, 2023, 03:17

Do you have relationships in this collection?

Drake
27 Sep, 2023, 03:18

What's your project id?

Said H
27 Sep, 2023, 03:30

Hi Steven, my project ID is huntpile, collection id = offer. There is no relationship at all in that table

Drake
27 Sep, 2023, 21:04

hmm let me see what we can do about this...

Said H
27 Sep, 2023, 22:58

Thanks

Said H
28 Sep, 2023, 23:08

By any chance this could be my own data error? So that I can investigate further?

ZachHandley
29 Sep, 2023, 04:45

did you set permissions?

Said H
29 Sep, 2023, 05:37

I tried to insert the record from appwrite console. I didn't set any permission during insertion. The collection has a permission to allow any users to create.

ZachHandley
29 Sep, 2023, 06:15

Yeah you’re not technically a user

ZachHandley
29 Sep, 2023, 06:15

well

ZachHandley
29 Sep, 2023, 06:15

Actually in the console with an api key you are

ZachHandley
29 Sep, 2023, 06:16

so you tried to create from console and it gave you that error

Drake
29 Sep, 2023, 06:26

Nah this was caused by the upgrade...your enum attribute didn't migrate over properly

Said H
29 Sep, 2023, 06:28

yes.

Said H
29 Sep, 2023, 06:29

oh. do I delete the attribute and recreate? in order for it to work

Drake
30 Sep, 2023, 00:29

That might work...if you're okay with losing the data.

Said H
30 Sep, 2023, 01:05

Thanks very much. I will do it.

Drake
30 Sep, 2023, 01:06

Or maybe even updating your enum

Said H
1 Oct, 2023, 23:38

Editing the enum works perfectly. Thanks a lot.

Said H
1 Oct, 2023, 23:38

[SOLVED] 500 error when creating a document

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