server hangs if a handler returns undefined
See original GitHub issuewith automatic promisifying, if a handler returns undefined, the promise never resolves and the server hangs…
Is there a reason we don’t immediately resolve(undefined)
if the handler does?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Getting back the event handler returns undefined
The onclick property is only going to show you an event handler if it is registered inline via the markup (e.g, <div id="relative" ......
Read more >One of the module nesting for handler is undefined #1377
Bug Report Current Behavior I'm currently deploying a Remix app with serverless and using serverless-offline to run my app on development ...
Read more >hapi — How to Fix “handler method did not return a value, a ...
The error message means that you returned undefined or null from your route handler. Hapi v17 expects you to return either a value,...
Read more >Exploring go net/http: How Server and the Handler structs works.
The first step of the infinite loop is to wait for a net.Conn ( a connection ) via the listener's Accept() function. If...
Read more >AWS Lambda function handler in Node.js
When your function is invoked, Lambda runs the handler method. ... context) { console.log("EVENT: \n" + JSON.stringify(event, null, 2)) return context.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for repro @danielroe! Actually it helped to find two issues:
req.url
notoriginalUrl
to allow using relative paths (no/api/js
in middleware itself)app.handle
, the hanging issue was happening so i made it hidden underapp._handle
(src)For a repro of hang:
yarn && yarn dev
curl http://localhost:3000/api/js/csr
- (using h2) hangscurl http://localhost:3000/api/ts/csr
- (using express) succeeds (e.g. falls back to Nuxt 404)Was trying (and failed) to replicate issue with #13 - but oh well, at least they add a few more tests 🤷♂️