DEV Community

Cover image for I wrote a simple error relay for Next.js to bypass Vercel's log filtering URL
Mark Kaave
Mark Kaave

Posted on

I wrote a simple error relay for Next.js to bypass Vercel's log filtering URL

When code fails on Vercel, Next.js production builds sanitize the output. You get an "Internal Server Error" ID, but the stack trace is often missing from the runtime logs unless you have an external log drain configured.

I didn't want to install a heavy SDK or pay for enterprise-grade observability just to see where my checkout was crashing. I wrote a tiny wrapper for app/error.tsx that captures the raw error object, attaches the current URL/context, and relays it to a webhook.

It’s barely 50 lines of code. No heavy dependencies or sourcemap uploads required.

Implementation details: bugmail integration guide

Top comments (0)