Next.js · Senior · Question 12 of 75

Why does error.tsx in production get a generic message for an error from a server component?

Explanation

Error text can contain SQL, paths and secrets, so the client gets a generic message plus error.digest - a hash for finding the full error in server logs. In development the full message is available.

Further reading

Problem with a question

Next.js · Senior · question 12

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz