auth-js icon indicating copy to clipboard operation
auth-js copied to clipboard

feat: support throwing errors instead of returning them

Open kiwicopple opened this issue 10 months ago • 1 comments

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.

kiwicopple avatar Jan 14 '25 18:01 kiwicopple

Don't worry about the check-conventional-commits errors, I'll fix those before merging.

hf avatar Jan 17 '25 09:01 hf

moved: https://github.com/supabase/supabase-js/pull/1766

mandarini avatar Oct 10 '25 14:10 mandarini