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

  1. Open the Vercel deployment logs and load the production site. You should see requests.
  2. Trigger a server action that you know fails in preview and confirm the function log records it.
  3. Confirm you are not logging the full session cookie.
  4. If you add an error tracker later, note it on the privacy page.

Prompt

Fix prompt
Paste into Cursor or Claude Code
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.

This uses the same ticks as the checklist page, saved in this browser.

Related error fixes