---
title: "Comment by Tarun Sharma on \"Fix Supabase \"Cannot coerce the result to a single JSON object\" (PGRST116)\" | Hashnode"
description: "Worth branching on error.details too, since PostgREST says how many rows it saw: \"The result contains 0 rows\" points at a missing row or an RLS policy hiding it"
url: "https://hashnode.com/posts/supabase-single-pgrst116-cannot-coerce-single-json-object/6afb271adc3680d475285109/comment/6afdf0c924b1265a24594862"
---

[Discussion](https://hashnode.com/posts/supabase-single-pgrst116-cannot-coerce-single-json-object/6afb271adc3680d475285109)

Comment [Fix Supabase "Cannot coerce the result to a single JSON object" (PGRST116)](https://hashnode.com/posts/supabase-single-pgrst116-cannot-coerce-single-json-object/6afb271adc3680d475285109)

[Tarun Sharma](https://hashnode.com/@101beardo)

[8h ago](https://hashnode.com/posts/supabase-single-pgrst116-cannot-coerce-single-json-object/6afb271adc3680d475285109/comment/6afdf0c924b1265a24594862)

Worth branching on error.details too, since PostgREST says how many rows it saw: "The result contains 0 rows" points at a missing row or an RLS policy hiding it, while 2 or more rows means a missing unique constraint, and those are different fixes. Also maybeSingle() is the better call when zero rows is a normal outcome, like a profile lookup before the user has saved anything.
