Next.js in Practice · Part 1020 min read
Errors, Redirects and Request Lifecycle APIs
How Next.js 16 turns thrown errors into UI and status codes (error.tsx, catchError, notFound, forbidden, unauthorized, redirect) and how the request lifecycle APIs after, connection, cookies, headers, draftMode and instrumentation.ts work under the hood.