refactor: rename useErrorBoundar option to throwError
throwError name makes the most sense as it's a common name within request packages like ky (ex: throwHttpErrors)
Closes: #4677
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 47acfc507653a0185de0f539e2e38ddcb97dbaa4:
| Sandbox | Source |
|---|---|
| @tanstack/query-example-react-basic-typescript | Configuration |
| @tanstack/query-example-solid-basic-typescript | Configuration |
| @tanstack/query-example-vue-basic | Configuration |
throwHttpErrors
good point about that. Do you thin throwErrors would be better than throwError ?
Also, can you please add a paragraph to the migration guide:
https://github.com/TanStack/query/blob/cfb15ef582e080c82c149cdcba998d3d5e570ae7/docs/react/guides/migrating-to-react-query-5.md#L6-L9
Oh, and the PR needs to go to the v5 branch please, not main 😅
Codecov Report
:exclamation: No coverage uploaded for pull request base (
v5@67ed215). Click here to learn what that means. Patch has no changes to coverable lines.
Additional details and impacted files
@@ Coverage Diff @@
## v5 #4697 +/- ##
=====================================
Coverage ? 92.39%
=====================================
Files ? 89
Lines ? 3748
Branches ? 985
=====================================
Hits ? 3463
Misses ? 269
Partials ? 16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
throwHttpErrors
good point about that. Do you thin
throwErrorswould be better thanthrowError?
I'm not sure about the plural version as it might imply that there are multiple errors being thrown, which is not the case, I believe. I'm happy to change it to the plural version if you think it is more fitting.
Although, you're able to reset the error boundary, at which point there can be another error thrown, which makes it multiple..
Also, can you please add a paragraph to the migration guide:
https://github.com/TanStack/query/blob/cfb15ef582e080c82c149cdcba998d3d5e570ae7/docs/react/guides/migrating-to-react-query-5.md#L6-L9
Is it fine that the id is "migrating-to-react-query-5" and the guide title is "Migrating to TanStack Query v5"?
Also, can you please add a paragraph to the migration guide:
https://github.com/TanStack/query/blob/cfb15ef582e080c82c149cdcba998d3d5e570ae7/docs/react/guides/migrating-to-react-query-5.md#L6-L9
Here you go 04b033bfe872cab747cb2d78bfad595ac3064cea
Is it fine that the id is "migrating-to-react-query-5" and the guide title is "Migrating to TanStack Query v5"?
hm, the id is the slug in the url. So maybe it should just be migrate-to-v5. I can do this directly on the v5 branch though.
I'm not sure about the plural version as it might imply that there are multiple errors being thrown, which is not the case, I believe. I'm happy to change it to the plural version if you think it is more fitting.
Although, you're able to reset the error boundary, at which point there can be another error thrown, which makes it multiple..
yeah let'a go with throwErrors please. It can be different kind of errors, like an error from the queryFn or an error from the selectFn. It can also be different errors at different times as you mentioned. I would read it as: "throw all errors that could potentially occur"
yeah let'a go with
throwErrorsplease. It can be different kind of errors, like an error from the queryFn or an error from the selectFn. It can also be different errors at different times as you mentioned. I would read it as: "throw all errors that could potentially occur"
Makes sense! Will do
@allcontributors add @Moshyfawn for code