Back

Update Operation Blocked Due to userAgent Field Issue

  • 0
  • Databases
  • Cloud
basstea66
9 Dec, 2024, 13:50

I created an attribute named userAgent in the leads collection, but now an error is being displayed. When I try to update a document, it doesn't let me successfully complete the update, even though I am not passing the userAgent field in the update operation. Could you please remove the duplicate userAgent field from the collection?

{ code: 400, type: 'document_invalid_structure', response: { message: 'Invalid document structure: Unknown attribute: "userAgent"', code: 400, type: 'document_invalid_structure', version: '1.6.1' } }

TL;DR
Trouble updating due to userAgent field issue causing error. To fix, remove the userAgent field or uncheck 'required' in appwrite console attributes settings.
D5
9 Dec, 2024, 13:53

You can't remove it in the appwrite console?

D5
9 Dec, 2024, 13:56

If you want to make it optional, you can remove the check of the "required" checkbox you can find in the appwrite console when creating the attribute. If it's an existing attribute, you can click the 3 dots (...), edit and then remove the check from the required checkbox

basstea66
9 Dec, 2024, 13:57

I can no longer update documents; an error occurs when I try.

{ code: 400, type: 'document_invalid_structure', response: { message: 'Invalid document structure: Unknown attribute: "userAgent"', code: 400, type: 'document_invalid_structure', version: '1.6.1' } }

basstea66
9 Dec, 2024, 13:58
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