Skip to content

docs(guides/mutations): add 'throwOnError' option - #725

Merged
tannerlinsley merged 1 commit into
TanStack:docsfrom
corbecker:docs
Jul 9, 2020
Merged

docs(guides/mutations): add 'throwOnError' option#725
tannerlinsley merged 1 commit into
TanStack:docsfrom
corbecker:docs

Conversation

@corbecker

Copy link
Copy Markdown

I was working off the examples for useMutation trying to get a form submission to throw with errors from the back-end.
The rejected Promise from mutate wasn't getting caught in the try/catch. I now see in the API an option for throwOnError which is defaulted to false, so I added it to the useMutation example with the try/catch block.

@vercel

vercel Bot commented Jul 9, 2020

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

@tannerlinsley
tannerlinsley merged commit aae1d35 into TanStack:docs Jul 9, 2020
@andrewmclagan

Copy link
Copy Markdown

dam, this really got me...

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.

3 participants