SupabaseS
Supabase4y ago
Mat

Getting an empty array on update

Hi everyone,

I'm stuck with a weird error response from supabase.

I'm trying to update a row in an addresses table. Here is my code:

JAVASCRIPT
const address_id = '322d4783-2692-4b63-a57e-a87ca248feb4';
console.log('address_id:', address_id);

const { data: address, error } = await supabase.from('addresses').update({ is_active: false }).eq('address_id', address_id);

if (address) return { status: 204 };

console.log('error:', error);
return { status: 400 };


for what I'm getting a empty array as a response:
address_id: 322d4783-2692-4b63-a57e-a87ca248feb4
error: []

seeing this: https://github.com/supabase/postgrest-js/issues/202,
I've verified twice the address_id exists in my table, it works well when getting or inserting the data.

You'll find below my RLS policy for update (same as insert and select)

Would anyone know anything about it?
Can bring further information if you need it!
Screenshot_2022-09-17_at_12.28.46.png
GitHub
Isomorphic JavaScript client for PostgREST. Contribute to supabase/postgrest-js development by creating an account on GitHub.
Was this page helpful?