Skip to content

Conversation

@stevenctl
Copy link
Contributor

What kind of change does this PR introduce?

Feature

What is the current behavior?

Users must check ClientError (and clear it?) which is a shared error for ~everything in the client rather than getting an error as part of a return value, specific to the function they just called.

  • It's difficult to see which operations are fallible
  • Fluent APIs/Builder pattern throws away intermediate errors rather than accumulating them, making things hard to debug

Please link any relevant issues here.

What is the new behavior?

  • New methods that have a WithError suffix on PingWithError, RpcWithError and NewClientWithError that return a tuple with an error.
  • Existing usage of fluent APIs continue to set ClientError to maintain backwards compat
  • Execute calls will return the accumulated errors from the builder(s) rather than the shared single ClientError

Additional context

I did my best to avoid breaking existing APIs so downstream users such as supabase-go are not forced to update immediately. If the maintainers want to break the API, I'd be happy to update my own usage :)

@muratmirgun
Copy link
Member

Thanks for contribution 🚀

@muratmirgun muratmirgun merged commit d758353 into supabase-community:main Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants