Query on Nextjs14 server action.
Unanswered
Crazy ant posted this in #help-forum
Crazy antOP
I have a server action method which is called in a dynamic page to render data. I also want to send 404status from server actions to page so that I can redirect to the not found page when data is not found. How can I send 404 status from server action to client. At present server action returns like ->
return {data: userDetail} . I know I can do it in page like this way if(!data) NotFound() But I want to it with 404 status.