https://supabase.com/ logo
Hello, I'm new to both Supabase and JavaScript. I ...
# javascript
b
Hello, I'm new to both Supabase and JavaScript. I was trying to do sign ups with email, password and additional user data, following what I saw in
https://github.com/supabase/supabase/discussions/3491
and
https://dev.to/sruhleder/creating-user-profiles-on-sign-up-in-supabase-5037
. I am getting the error message > Database error saving new user every time I try to do a sign up, accompanied by a code 500 error. I've tried everything I could think of to solve it. I've checked the table's field types, email confirmation, the SQL queries, and still nothing. Am I missing something gruesomely obvious?
g
So the 500 error is 95% sure your trigger function failing. You might see a clue in the database postgres logs. If you don't find anything there then: First I would remove the trigger and see if your user gets created and then go to the table UI in the dashboard select auth schema and look at the user table metadata column to see if your meta data is there. If so then you need to debug your trigger function itself which if you want help would need to show the function and probably your profile table. If it is not there, then likely your js call is not formatted correctly.
b
Yep, turns out I was indeed missing something gruesomely obvious. Checked the logs as you suggested and was able to find the problem on the trigger. Thank you! I was running in circles at this point.