You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the correct behavior for all next/navigation functions at the moment, but I can understand that it might be confusing because users expect notFound() and forbidden() to trigger onError() instead. However, I believe redirect() should continue to trigger onSuccess() (as has already been explained in various issues/discussions in the past). What do you think? I could make notFound() and forbidden() trigger onError() in v8, which would be a breaking change.
Are you using the latest version of this library?
Is there an existing issue for this?
Describe the bug
The following code logs
Success.
to the browsers console.Reproduction steps
Call
notFound()
in a server action.Expected behavior
I expected the
onError
callback to fire.Link to a minimal reproduction of the issue
none
Operating System
macOs
Library version
7.10.4
Next.js version
15.1.5
Node.js version
22
Additional context
No response
The text was updated successfully, but these errors were encountered: