in next.js 15 using app route: https://nextjs.org/docs/app/api-reference/file-conventions/error
error.js An error file allows you to handle unexpected runtime errors and display fallback UI.
error.js
An error file allows you to handle unexpected runtime errors and display fallback UI.