-
Notifications
You must be signed in to change notification settings - Fork 29
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
Allow action to throw error #182
Comments
Hi, I am planning to improve error handling for the |
Thanks for the amazing work! |
Hey, I'm not really familiar with what errors can be.
|
@IdoPesok Hey, just wondering are you still working on this project or do you still plan to release v1? Anyway thanks for the great work. |
I tried creating my own helper function for creating server actions and handling server action results and it's quite good since you can add a lot of custom behaviours like:
And a function to handle the result on the client that:
Let me know if you're interested. |
It would be convenient to add a helper chaining method (e.g.
.throw()
) so that the server action would throw the error instead of returning it.Use cases: the
error.tsx
and<ErrorBoundary />
components would automatically work if the server action throws the error, now I have to manually re-throw itif with the chaining method I could just do
The text was updated successfully, but these errors were encountered: