-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting 406s in network logs if .maybeSingle()
returns no result
#361
Comments
Hmm the trace points to postgrest-js/src/PostgrestBuilder.ts Line 70 in 84f1518
So it comes from the |
Not ideal to ignore the error on the client as the logs would also still contain the 406. I think PostgREST/postgrest#2164 (comment) would be the ideal solution. (basically a header that defines expected number of returned rows) |
Gotcha, changing this issue to track refactoring the code to use that feature once it's out 👍 |
.maybeSingle()
returns no result.maybeSingle()
returns no result
Hi @soedirgo Any update on when this might be addressed? |
@brentrobbins can try to |
I am using This seems to be a mistake. I would expect this type of query to return a 200 status with a null result, as opposed to a non-200 status. |
Any update on this? For us the issue appears to be this line: https://github.com/supabase/postgrest-js/blob/v0.37.4/src/lib/types.ts#L151 which contains hard coded |
On PostgREST 11.2.0, the format of the error got changed on PostgREST/postgrest#2876 to "The result contains 0 rows". I didn't know |
🎉 This issue has been resolved in version 1.8.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Bug report
Describe the bug
When selecting using
.maybeSingle()
, I'm getting an error logged to console if there's 0 rows returned. There's no error if I remove.maybeSingle()
, and there's no error if a row is returned.To be clear, the query still returns successfully.
The stack trace seems to points to this line (probably a bad source map):
postgrest-js/src/PostgrestBuilder.ts
Line 102 in 84f1518
To Reproduce
System information
The text was updated successfully, but these errors were encountered: