Hi, I think that catching writePromise rejection on busboy finish event seems too late, because it happens at dataHandler(data) on busboy data event and already in this point promise should have its reject callback in case of stream write errors.
The best solution on writePromise rejection would be stop fetching rest of the request to not waste the bandwidth, similar like it is done in closeConnection() and then call next(err) error handler (not next() middleware`, but for now I don't get a well-functioning solution for that just this one.
Hi, I think that catching writePromise rejection on busboy finish event seems too late, because it happens at
dataHandler(data)
on busboy data event and already in this point promise should have its reject callback in case of stream write errors.The best solution on writePromise rejection would be stop fetching rest of the request to not waste the bandwidth, similar like it is done in
closeConnection()
and then callnext(err)
error handler (notnext()
middleware`, but for now I don't get a well-functioning solution for that just this one.