DEV Community

Sean Atukorala
Sean Atukorala

Posted on

1 1

[Solved] Supabase 'insert()' not inserting table record

Problem:

When using supabase the insert statement is not inserting new records into the specified database table

Insert operation in usage

Figure 1: Insert operation in usage

Solution:

There are many causes for this error. Here is one potential solution:
Make sure to examine/log out the error parameter in the const { data, error } ... statement. Often times a mismatching column type or missing column will cause errors when trying to insert a record in a specific database table.

To aid in the debugging process try using your native browser debugger. Here is a guide on how to use the debugger in Google Chrome DevTools, and here is a corresponding guide for Firefox

Conclusion

Thanks for reading this blog post!

If you have any questions or concerns please feel free to post a comment in this post and I will get back to you when I find the time.

If you found this article helpful please share it and make sure to follow me on Twitter and GitHub, connect with me on LinkedIn and subscribe to my YouTube channel.

Billboard image

The fastest way to detect downtimes

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitoring.

Get started now

Top comments (0)

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay