How a missing error check silently failed 20 CRM archive operations in Supabase
A developer discovered that 20 CRM contacts marked as archived remained active the following morning, with no errors logged anywhere in the system. The root cause was a Supabase server action that called a database update but never destructured the returned { data, error } object, meaning any failure went completely unnoticed. Supabase's JavaScript client, by design, does not throw exceptions on database errors — instead it returns an error object that the caller must explicitly inspect. In this case, an RLS policy lacked UPDATE permission, silently rejecting every operation while the code continued returning { ok: true }. The incident highlights how return-value error conventions can create dangerous silent failures when callers neglect to handle the error field.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in