Back

err: document_invalid_structure - Invalid document structure: Missing required attribute "longitude"

  • 0
  • Databases
  • Web
  • Cloud
Sydney
25 Oct, 2023, 05:30

Running into a bit of a weird error with Appwrite Cloud v.1.4.7:

I'm trying to create documents with the node sdk via a next.js api route, but I'm recieving this error;

TypeScript
{
  code: 400,
  type: 'document_invalid_structure',
  response: {
    message: 'Invalid document structure: Missing required attribute "longitude"',
    code: 400,
    type: 'document_invalid_structure',
    version: '0.11.17'
  }

Which would make sense if longitude was actually missing, but what's actually happening is that it's throwing the error and then proceeding to create the document afterwards - including the longitude value...

the document type has 16 attributes so I'm thinking it's possibly returning a response after the request is queued but not completed because it's taking longer than expected or something, any help would be great thank you!

TL;DR
The user is encountering an error with Appwrite Cloud while creating documents with the Node.js SDK. They are receiving an "Invalid document structure: Missing required attribute 'longitude'" error, but the document is actually being created successfully with the longitude value. The user suspects that the error occurs because the request is taking longer than expected.
Drake
25 Oct, 2023, 17:51

what's your code?

Drake
25 Oct, 2023, 17:51

and are you using relationships?

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