Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Conversation

@maxmetcalfe
Copy link
Contributor

What kind of change does this PR introduce?

Adds support for .throwOnError() (see: #150, supabase/supabase-js#92)

What is the current behavior?

Errors are not thrown and instead a response object is returned with data and error properties.

What is the new behavior?

When .throwOnError() is supplied, errors are thrown.

Additional context

This is disabled by default as it's a breaking change. This follows the identical function added in supabase/postgrest-js#188.

@maxmetcalfe maxmetcalfe changed the title add support for .throwOnError() feat: add support for .throwOnError() Aug 29, 2025
@mandarini mandarini self-assigned this Sep 4, 2025
@mandarini mandarini linked an issue Sep 4, 2025 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Sep 4, 2025

🚀 Preview Release Status

false


Last updated: 2025-09-08T08:48:00Z

@mandarini
Copy link
Contributor

@maxmetcalfe thank you for this PR! Can you please add a few more test cases?

@mandarini mandarini self-requested a review September 5, 2025 14:23
@maxmetcalfe
Copy link
Contributor Author

@mandarini - added more tests!

Copy link
Contributor

@mandarini mandarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this. Thank you @maxmetcalfe . Eventually, the goal is to add this functionality to all the client libs. Will be easier once moved to the monorepo, in a shared lib.

@mandarini mandarini merged commit a814b7d into supabase:main Sep 8, 2025
3 checks passed
@kiwicopple
Copy link
Member

🎉 This PR is included in version 2.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@maxmetcalfe maxmetcalfe deleted the throw branch September 8, 2025 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add .throwOnError() for storage API

3 participants