Replies: 1 comment 4 replies
-
Is this the only way to get at the validationErrors? const { execute } = useAction(testAction, {
onSuccess: () => toast.success('Success'),
onError: (err) => {
toast.error(
`Error: ${JSON.stringify(err.error.validationErrors, null, 2)}`,
);
},
}); I really like the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following server action:
Action
… which I'd like to use with
toast.promise
as follows:Client Component
Unfortunately, I'm unable to retrieve the custom error message in the client component. All I'm getting is a generic
Error: Server Action validation error(s) occurred
error. What am I missing?Beta Was this translation helpful? Give feedback.
All reactions