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
Fixes#1020
Add support for `throwOnError` option in `AuthClient` to throw errors instead of returning them.
* **GoTrueClient Changes:**
- Add `throwOnError` option to `GoTrueClient` constructor.
- Modify methods to throw errors when `throwOnError` is true.
- Update methods like `signUp`, `signInWithPassword`, `updateUser`, and others to throw errors if `throwOnError` is true.
* **AuthClient Changes:**
- Update `AuthClient` to pass `throwOnError` option to `GoTrueClient`.
* **Tests:**
- Add tests in `test/GoTrueClient.test.ts` to verify `throwOnError` functionality.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/supabase/auth-js/issues/1020?shareId=XXXX-XXXX-XXXX-XXXX).
Feature request
Describe the feature
Add a
throwOnError
client option to have errors be thrown instead of returning it. As an example, right now we do:But with
throwOnError
we do:Additional context
Follows supabase/postgrest-js#188 & supabase/postgrest-js#248
The text was updated successfully, but these errors were encountered: