mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What Handling server action errors capturing in instrumentation.js `onRequestError` API Closes NDX-21
16 lines
285 B
JavaScript
16 lines
285 B
JavaScript
'use server'
|
|
|
|
import { notFound, redirect } from 'next/navigation'
|
|
|
|
export async function redirectAction() {
|
|
redirect('/another')
|
|
}
|
|
|
|
export async function notFoundAction() {
|
|
notFound()
|
|
}
|
|
|
|
export async function serverLog(content) {
|
|
throw new Error('[server-action]:' + content)
|
|
}
|