What is the difference between `Error` boundary and `next/error`?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is the difference between `Error` boundary and `next/error`?
Asked by:
65 Viewed 65 Answers

Answer (65)

Best Answer
(347)
The `Error` boundary is a general-purpose error handler that you can implement yourself. The `next/error` is a more specific, built-in component that's part of Next.js. `next/error` provides a more streamlined way to handle errors and offers features like automatic fallback pages. Using `next/error` is generally recommended for its convenience.