Open Shidoengie opened 9 months ago
I think that the whole supabase-js api is working that way. And I personnaly disliked it at first, but now its seem perfect to me. Just create your own wrappers to check {data, error} and eventauly throw your own Error class.
Bug report
Describe the bug
This started when i tried using a try catch on the auth.signUp function but finding out that even though a error is returned catch is never called I found out that this aplies to a lot of functions and its pretty bad for DX
To Reproduce
Expected behavior
API functions should return responses and throw errors instead of having a error field that may or may not be null.
System information