Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppwriteException: Document with the requested ID could not be found. api.ts:264 #36

Open
akshaydhame2001 opened this issue Jan 22, 2024 · 2 comments

Comments

@akshaydhame2001
Copy link

►GET https://cloud.appwrite.io/v1/databases/6580fe3.../collections/6586 api.ts:254 534.../documents/undefined 404 (Not Found) AppwriteException: Document with the requested ID could not be found. api.ts:264 at Client. (http://localhost:5173/node modules/.vite/deps/appwrite.js? v=639e56a2:850:17) at Generator.next () at fulfilled (http://localhost: 5173/node modules/.vite/deps/appwrite.js?v=639e56a 2:488:24) Query data cannot be undefined. Please make sure to return a value console.js:213 other than undefined from your query function. Affected query key: ["getPostById", "undefined"]

I have trouble with the edit post in the social media app project. In the tutorial the data automatically got populated in editpost except the image but in my case it doesn't.

Errors:
I'm getting an GET error 404 for appwrite document ID and also getting query 'getPostById' to undefined

So in api.ts getPostById I checked that it's returning databaseID and postCollectionID from appwriteconfig but not the postId and that's why the post.

But I don't know why

Please help

@UMDhodi
Copy link

UMDhodi commented Jan 29, 2024

did you find solution ?

@Jack-Jackk
Copy link

Make sure in your PostCard.tsx the <Link to={/update-posts/${post.$id}} is correct as well as the link to /posts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants