Next.js Discord

Discord Forum

Server Components errors are logged as plain text on the server

Unanswered
nikos.zinas posted this in #help-forum
Open in Discord
Hi everyone. I am running a Next.js project (App Router). When I throw an error in a server component, the logs are sent in plain text, and this results in several lines in the axiom logs, which cause noise and confusion. I haven't found any way to catch these errors on the server to avoid that. Any advice on how to handle it?

Everything mentioned in the docs about error.tsx only helps with client side logging, but my issue is on the server side

0 Replies