Checklists /Cursor or Claude Code, Next.js and Vercel /Monitoring
Medium
Turn on error logs before you invite users
Vercel keeps function logs, but only if you look at them, and client errors never appear there unless you send them. A hydration mismatch or a failed server action will otherwise show up as a user saying the button did nothing.
How to check
- Open the Vercel deployment logs and load the production site. You should see requests.
- Trigger a server action that you know fails in preview and confirm the function log records it.
- Confirm you are not logging the full session cookie.
- If you add an error tracker later, note it on the privacy page.
Prompt
Fix prompt
You are working in this repository. Do not add features.
Goal: server errors are logged with console.error as JSON, and the UI shows a recoverable message.
Steps:
1. Add an error.tsx for the public segment so a render error is not a blank page.
2. In route handlers, log { path, message } on failure. Do not log headers or body.
3. Keep the existing Vercel runtime. Do not add a new paid service unless one is already configured.
4. Tell me how to open the logs for the production deployment.