Back

Appwrite server error:

  • 0
  • Web
nischal.batas
1 Mar, 2024, 05:50

Before adding any item to the database I want to check whether the item with sam itemId and userId exists or not

TL;DR
Developers are encountering an Appwrite server error while using Query or creating conditions. The issue may be related to a POST request error. They should check their JavaScript understanding, database attributes, and console.log statements for a resolution.
fafa
1 Mar, 2024, 07:06

Am I missing something? What is the question you have? Quickly looking over it, it looks fine

nischal.batas
1 Mar, 2024, 15:53

When I click on add to cart button it return appwrite server error

nischal.batas
1 Mar, 2024, 15:53
fafa
1 Mar, 2024, 15:55

Server error means something went wrong in the request, most likely the POST request. You added console.log, you should show them too.

nischal.batas
1 Mar, 2024, 15:55
nischal.batas
1 Mar, 2024, 15:55

I am getting to this error

nischal.batas
1 Mar, 2024, 15:56

This is my nextjs file

nischal.batas
1 Mar, 2024, 15:56
nischal.batas
1 Mar, 2024, 15:58

This is my appwrite file

nischal.batas
1 Mar, 2024, 15:58
fafa
1 Mar, 2024, 15:58

I feel like you have slight understanding of JS, which is not a problem, but you are showing images which you cannot do much with. This is for getting the items, but not sending

nischal.batas
1 Mar, 2024, 15:58

I am getting error when I use Query or while creating that condition

fafa
1 Mar, 2024, 15:59

Do you have attributes?

nischal.batas
1 Mar, 2024, 15:59

you mean in database

fafa
1 Mar, 2024, 15:59

also what's after this?

fafa
1 Mar, 2024, 15:59

No, in your database you have a collection, in the collection you have attributes

nischal.batas
1 Mar, 2024, 16:00

createDocument work perfectly

nischal.batas
1 Mar, 2024, 16:00
fafa
1 Mar, 2024, 16:00
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