Back

Error After Renaming Attribute in Appwrite Collection

  • 0
  • Cloud
M Zeeshan
10 Dec, 2024, 01:51

hello there... I think there's a bug in Appwrite. I created a collection named glasses with several attributes, including one called thumbnailUrl. Today, I decided to rename this attribute to thumbnail. However, Appwrite is now throwing an error. Here's what happened and the error I'm receiving:

TypeScript
[AppwriteException: Invalid document structure: Missing required attribute "thumbnailUrl"] {
  name: 'AppwriteException',
  code: 400,
  type: 'document_invalid_structure',
  response: {
  message: 'Invalid document structure: Missing required attribute "thumbnailUrl"',
  code: 400,
  type: 'document_invalid_structure',
  version: '1.6.1'
 }
}

My glasses collection is empty.

TL;DR
Developers renamed the 'thumbnailUrl' attribute in an Appwrite collection to 'thumbnail' and encountered an error, even though the collection was empty. The error indicated a missing required attribute 'thumbnailUrl'. **Solution:** Ensure to update the attribute name in all relevant locations within the Appwrite collection settings to match the new name 'thumbnail'.
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