HonoX currently lets you define a _error.tsx error page, but they only work for routes defined at the same level as the file.
For example, an _error.tsx at the root level will not be triggered by errors in a /users/me route. You must define a separate _errors.tsx within the /users directory.
├── app/
│ ├── routes/
│ │ ├── _error.tsx // only works on routes in this folder, not children
│ │ ├── users/
│ │ │ ├── _error.tsx // without this, any /users routes will not have an error page
This leads to having to duplicate an _error.tsx file in every directory of the app.
(You can see the logic in the HonoX code here where it only defined the error handler when the directory matches where the error file was created.
It would be nice to define a single root-level _error.tsx page that will be used for any subdirectories, unless they define one. Or, even better will be to cascade the errors pages, which will use the closest parent _errors.tsx file.
What is the feature you are proposing?
HonoX currently lets you define a
_error.tsx
error page, but they only work for routes defined at the same level as the file.For example, an
_error.tsx
at the root level will not be triggered by errors in a/users/me
route. You must define a separate_errors.tsx
within the/users
directory.This leads to having to duplicate an _error.tsx file in every directory of the app.
(You can see the logic in the HonoX code here where it only defined the error handler when the directory matches where the error file was created.
It would be nice to define a single root-level
_error.tsx
page that will be used for any subdirectories, unless they define one. Or, even better will be to cascade the errors pages, which will use the closest parent_errors.tsx
file.