Next.js: NEXT_REDIRECT Is Caught by try/catch
After calling redirect(), the user stays on the page, and NEXT REDIRECT appears in the log. The redirect function throws an internal navigation control exception; a wide tri/catch can swallow it.
How to determine the source of the error
Search for redirect() inside tri/catch blocks in Server Action and Server Component.
Check that the catch returns the message or the error object instead of allowing the redirection.
What to do step by step
1. Execute the write operation in tri and redirect() only when the write has been completed.
2 . Separate validation and database errors from navigation change; use a controlled state value to return form errors.
How to check the score
After the correct record, the correct redirection occurs and the write error continues to give clear information in the form.
What to do
Do not treat NEXT REDIRECT as a normal server error and do not return the code 500.