You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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."}
@levity Thanks for reporting this issue. again there is change of error message in postgrest. as @J0 suggested in #289 we need a robust solution for repeating problem. I am happy to apply this temp fix again for now and also open for suggestions to how we can make it dynamic.
This was a breaking change that was made and switching this back would be yet another breaking change. I'm not so sure if this should be reverted. It should be also noted that the current behavior differs to that of the JavaScript library as the JS library follows along the original implementation which returns an ApiResponse with data=None.
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: