Priyanka
Priyanka•5mo ago

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
ari
ari•5mo ago
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
Priyanka
PriyankaOP•5mo ago
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!
ari
ari•5mo ago
Can you see the output of your console.error on the logs page of the convex dashboard?
Priyanka
PriyankaOP•5mo ago
yes I can see just a min
Priyanka
PriyankaOP•5mo ago
this is the log of the error I am facing
No description
Priyanka
PriyankaOP•5mo ago
there is no detailed information about the error.
ari
ari•5mo ago
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 error
Priyanka
PriyankaOP•5mo ago
No, 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 !
ari
ari•5mo ago
Awesome! Glad it worked out

Did you find this page helpful?