Need Assistance?

support@tutorialshub.in

Loading States, Errors & Not Found

Graceful Error Boundaries (error.jsx)

ADVERTISEMENT
Next.js Free Lesson
5 min read
ADVERTISEMENT

Things go wrong in production—an API might time out or a database query might fail. Creating an error.jsx file catches runtime errors inside that route segment and shows a friendly recovery screen with a "Try Again" button instead of crashing your entire app.

Note: error.jsx must always be a Client Component ('use client').

ADVERTISEMENT
Hi, I'm Tuby! Here to help you