Skip to content

Conversation

mandarini
Copy link
Contributor

Moved from: supabase/auth-js#1022
Author: @kiwicopple

Fixes #1688

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.

@mandarini mandarini requested review from a team as code owners October 10, 2025 14:51
@mandarini mandarini requested a review from hf October 10, 2025 14:51
@mandarini mandarini added the auth-js Related to the auth-js library. label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth-js Related to the auth-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support throwing errors instead of returning them

2 participants