Does anyone know why I am getting an array under t...
# javascript
j
Does anyone know why I am getting an array under the error property, if the WHERE clause has no match, in response to an UPDATE query via the supabasejs client? i.e.
supabase.from('some_table').update({some_column: 10}).match({'id': 1});
My result is: { error: [], data: null, count: null, status: 404, statusText: 'Not Found', body: null } Not sure if this is intentional and should be handled in some particular manner, or not.
s
Yikes. Can repro this, will look into it.
but FTR
error
should never be an array
j
Thanks, happy to work on a solution as well. I just wanted to make sure there wasn't some intention beyond my understanding.
Should I create an issue/pr or you got it?
s
There was actually a similar issue a while back [0] though I'm not sure if it has the same root cause. I'll be tracking it there [0] https://github.com/supabase/postgrest-js/issues/202
j
Oh, my bad I didn't see this one. Ah I see, it's a SELECT instead of UPDATE.
Thanks for your help 😄