-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Actions: Make .safe()
the default return value
#11571
Conversation
🦋 Changeset detectedLatest commit: 05b163f The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
.safe()
the default return value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
Does this interact in any way with this issue? #11515 |
@Princesseuh Taking a look at that issue. This is switching a default, but wouldn't affect parsing behavior, so I don't believe so. |
4035591
to
05b163f
Compare
Changes
Make
.safe()
the default return value for actions. This means{ data, error }
will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the.orThrow()
modifier..orThrow()
will remove progressive enhancement, since exceptions must be caught on the client.Testing
Update test fixtures to use the new API pattern.
Docs
RFC updates to be pushed on minor release