Unexpected error in database trigger
Following the basic example of creating a profile when a new user is created in the
However, if I use the same
The error has a code of "unexpected_failure" and a message of "Database error saving new user". The schema is correct and the RLS policy allows updates to the
auth.users table, it works fine when simply inserting a new record into the public.profiles table as follows:However, if I use the same
invite_id from raw_user_meta_data to update the public.invites table as follows, I get an error:The error has a code of "unexpected_failure" and a message of "Database error saving new user". The schema is correct and the RLS policy allows updates to the
public.invites table, not sure what else it could be. Hard to debug these triggers.