-
Notifications
You must be signed in to change notification settings - Fork 44
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
maybe_single throws an error when 0 rows are returned #340
Labels
bug
Something isn't working
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Describe the bug
maybe_single is supposed to return None when the query returns no rows. But now it throws an APIError:
postgrest.exceptions.APIError: {'message': 'Missing response', 'code': '204', 'hint': 'Please check traceback of the code', 'details': "Postgrest couldn't retrieve response, please check traceback of the code. Please create an issue in `supabase-community/postgrest-py` if needed."}
To Reproduce
Run any query that returns 0 rows, e.g:
postgrestClientInstance.from_('my_table').select('*').eq('content', 'nonexistent').maybe_single().execute()
Expected behavior
should return
APIResponse(data=None)
as in previous versionsSystem information
The text was updated successfully, but these errors were encountered: