Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork875
Closed
Labels
Description
What version of Hono are you using?
3.8.0
What runtime/platform is your app running on?
Cloudflare Workers
What steps can reproduce the bug?
When usingapp.onError() within a nested route, the path parameters are not accessible.
c.req.param('assignmentId') does not work whenapp.onError(err, c) is in the nested route file
index.js
routes/example.js
See this project for example:https://github.com/justinwride/hono-path
What is the expected behavior?
I expect to access the path parameter for the route/assignments/:assignmentId? usingc.req.param('assignmentId')
What do you see instead?
Instead,c.req.param('assignmentId') isundefined
Additional information
It works ifapp.onError() is put inindex.js, but not if it is used inroutes/example.js.
I have been experimenting with Hono and enjoy the simplicity and speed. I'm the CTO of an ed-tech company and hope to use it more in our tech stack.