Back

Appwrite Errorw

  • 0
  • Cloud
miles
13 Apr, 2024, 14:35

i am creating a social media app utilizing appwrite but during a function which is postform for creating post, i encounter some issue when i create post

TL;DR
Developers are encountering errors when creating posts in a social media app with Appwrite. The error message indicates a missing required attribute "accountId." To fix this, developers need to ensure the correct attribute is included in the document structure when creating a post.
miles
13 Apr, 2024, 14:36

@D5

miles
13 Apr, 2024, 14:38

message":"Server Error","code":500,"type":"general_unknown","version":"0.12.142"}

D5
13 Apr, 2024, 14:44

Thanks for creating the post!

D5
13 Apr, 2024, 14:44

What's the code that throws that?

miles
13 Apr, 2024, 14:45

cloud.appwrite.io/v1/databases/65d5ac8a17f677bd67d5/collections/65d5ad4566ee507f9576/documents:1

TypeScript
   Failed to load resource: the server responded with a status of 400 ()

api.ts:163 Error creating post: AppwriteException: Invalid document structure: Missing required attribute "accountId" at Client.<anonymous> (http://localhost:3000/node_modules/.vite/deps/appwrite.js?v=fbe98513:850:17) at Generator.next (<anonymous>) at fulfilled (http://localhost:3000/node_modules/.vite/deps/appwrite.js?v=fbe98513:488:24)

miles
13 Apr, 2024, 14:46

its due to failed to load resource: the server responded with .....

D5
13 Apr, 2024, 14:56

Yes, but what's the app code fragment that throws that error?

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