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.

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs