Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump postgrest-js #201

Merged
merged 3 commits into from
Jun 13, 2021
Merged

Bump postgrest-js #201

merged 3 commits into from
Jun 13, 2021

Conversation

soedirgo
Copy link
Member

@soedirgo soedirgo commented Jun 11, 2021

Implement unwrap() to throw query errors instead of returning them: supabase/postgrest-js#188

fix: change match's value type to unknown: supabase/postgrest-js#192

Closes #203.

@soedirgo soedirgo changed the title feat(postgrest-js): support throw on error Bump postgrest-js Jun 12, 2021
@soedirgo soedirgo merged commit cd0163d into master Jun 13, 2021
@soedirgo soedirgo deleted the feat/throw-on-error branch June 13, 2021 05:42
@kiwicopple
Copy link
Member

🎉 This PR is included in version 1.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kiwicopple
Copy link
Member

Awesome @soedirgo - did we have any docs for this? If you drop a note to me here I can add them to our website

@soedirgo
Copy link
Member Author

Hmm, I don't think we do—I think we can add this as an example in Reference > Data > select():

Throwing on errors

Instead of handling errors using the returned error field, you can make it throw on errors instead:

try {
  const { data } = await supabase
    .from('missing_table')
    .select()
    .throwOnErrors()
  // do something with `data`
} catch (e) {
  // handle error
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Typescript error] match filter only accepts string values
2 participants