📄 SKILL.md

← Vault

name: supabase-upsert-vs-insert

description: Fix Supabase JS client insert() silently returning false by using upsert() instead


Supabase JS Client: insert() returning false silently — use upsert() instead

Problem

When calling supabase.from('tasks').insert({...}) from the browser (TanStack Start / React SPA), the operation sometimes returns { data: null, error: null } without any actual database write occurring. The onSave callback receives false but the error message is empty/misleading.

Symptoms: