restify / restify/node-restify
res.redirect unusable in async route handler.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 975
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 5
Description
- Used appropriate template for the issue type
- Searched both open and closed issues for duplicates of this issue
- Title adequately and concisely reflects the feature or the bug
Restify Version: 9.0.0-rc.3
Node.js Version: v16.13.0
Expected behaviour
Redirect shouldn't need the next callback parameter anymore.
Actual behaviour
Impossible to use res.redirect from an async route handler
Repro case
Call res.redirect from an async route handler
Cause
The direct function requires the next callback function to be passed.
Are you willing and able to fix this?
Yes, but I'm not sure how it should be fixed, or if this is even intentional.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing res.redirect from an async route handler and inspect how the direct function uses the next callback. Reproduce the reported failure with the issue's restify and Node.js versions, then verify that redirect works without requiring next while preserving existing callback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100