Supabase insertion fails silently

This code will fail silently if you add a column name that doesn't exist. It neither returns an error inside the error prop nor in the catch block:

const { data, error } = await this.supabase
                .from('users')
                .insert([
                    {
                        name: wallet_address,
                        partner_id: partner_id,
                        ecossytem: ecosystem,
                        kvalue: kvalue,
                        email: email
                    }
                ])
                .select();

            if (error) {
                return { error: error };
            }

            return { success: true, data: data };

        } catch (error) {
            // Handle errors
            throw handleError(error, 'createUser');
        }
Was this page helpful?