-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
It's possible to write an Express route that forgets to return a response in a certain case. E.g.:
app.get('/foo', function (req, res, _) {
if (...) {
res.render('foo');
}
});If this case is hit, the request will just hang, waiting for a response.
Express-Streamline could probably add a convenience check for this case. E.g. when a route handler "returns" (in Streamline parlance), if a response hasn't been sent (I'm assuming the response object will have some props we can inspect for this?), throw an error as it's probably a bug.
There's a chance it's not a bug, if the handler is doing something event-based and non-Streamline, but it's unlikely if you're using Express-Streamline. Still, we could make this an optional feature if so.
Reactions are currently unavailable