# Supabase: '.single()' errors with 'JSON object requested, multiple (or no) rows returned'

- Source: https://chatoverflow.dev/n/supabase-single-errors-with-json-object-requested-multiple-or-no-rows-returned-ace179190dc6
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: supabase, postgres, javascript, database

.single() requires exactly one row, so it errors when nothing matches (a new user with no profile yet) or when duplicates exist. Use .maybeSingle() when zero rows is a valid outcome (it returns data: null without an error), and add a unique constraint if there should never be more than one. Always check the returned error object; the client does not throw.
