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
At first glance I could not find a reason why the type PostgrestError is necessary and whether the class PostgrestError can be used in place of type PostgrestError: #562
As we and probably most use postgrest-js through supabase-js, I also opened a bug report there: supabase/supabase-js#1287
Bug report
Describe the bug
With the latest release v2.45.5 when importing PostgrestError from supabase-js, the PostgrestError class (https://github.com/supabase/postgrest-js/blob/master/src/PostgrestError.ts) is now imported instead of the PostgrestError type (https://github.com/supabase/postgrest-js/blob/master/src/types.ts) which are not compatible:
This change was introduced with this pull request: #555
To reproduce
Write a generic function with a PostgrestError object as a parameter:
Then try to use this function with an error object returned by, e.g., a Supabase query:
Expected behavior
Type-check is successful
System information
The text was updated successfully, but these errors were encountered: