supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

Error on update()

Open ohrrkan opened this issue 2 years ago • 2 comments

Version : "@supabase/supabase-js": "2.38.4",

The error object return by the update function is empty => making error identification difficult.

-To reproduce you can for example try to update an non-existent id, or update a database without having the policy right to do it.

const { error } = await supabase.from('countries').update({ name: 'Australia' }).eq('id', 9999)

ohrrkan avatar Oct 27 '23 14:10 ohrrkan

I have a similar problem with insert() and I don't know what's wrong with my data. This issue combined with a lack of debugger support makes it hard to develop...

jcerjak avatar Dec 14 '23 11:12 jcerjak

Possibly related issue in postgrest-js: https://github.com/supabase/postgrest-js/issues/381

jcerjak avatar Dec 14 '23 16:12 jcerjak