supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
964 stars 128 forks source link

fix: detection of maybeSingle #486

Closed steve-chavez closed 8 months ago

steve-chavez commented 8 months ago

Fixes #361.

On PostgREST 11.2.0, the format of the error got changed on PostgREST/postgrest#2876 to "The result contains 0 rows".

Change the detection to "0 rows". This should be backwards compatible.

steve-chavez commented 8 months ago

@soedirgo Does this part need adjusting too?

https://github.com/supabase/postgrest-js/blob/7b0a69660e20ac11d7c3720604e338adb2e33d0a/src/PostgrestBuilder.ts#L105-L116

Seems to rely on the error message as well.

github-actions[bot] commented 8 months ago

:tada: This PR is included in version 1.8.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: