Hi, I am facing some error in while inserting data into the table created on convex database.
In the frontend, I am taking the user input as a string input for the date input using python. In the schema, I have defined that column to be a v.string() type. Still there is some error while inserting into the table. I am new to javascipt/typescript programming. Can anyone help me with this? Thank you!
9 Replies
HI @Priyanka , I can help debug if you share the error you're seeing, and some code 🙂 Also, here are some tips on how to deal with dates in convex: https://docs.convex.dev/database/types#working-with-dates-and-times
Data Types | Convex Developer Hub
All Convex documents are defined as Javascript objects. These objects can have
Sure, here is the screenshot of the error:
And the python code client side and the mutation function for inserting into the table. Thank you!
Can you see the output of your
console.error
on the logs page of the convex dashboard?yes I can see
just a min
this is the log of the error I am facing
there is no detailed information about the error.
before the
failure
log, it looks like there should be an error
log containing the contents of the error, do you see that as well? If not, try updating your code to throw the initial errorNo, I don't see the error. Okay, I'll update the code . thank you!
I fixed the error. There was some issue with the schema of the users table and the food_items table to which I was trying to insert the data into. Now it's resolved. Thank you @ari !
Awesome! Glad it worked out