From 0713f6f91691acae18d0968fe64da739d81fd612 Mon Sep 17 00:00:00 2001 From: Dries Staelens Date: Wed, 28 Jun 2017 15:31:59 +0200 Subject: [PATCH] Add error handlers for parser errors --- lib/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/index.js b/lib/index.js index 851a8f4..eaa531c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -154,10 +154,14 @@ function processMultipart(options, req, res, next) { req.files[fieldname] = [req.files[fieldname], newFile]; } }); + + file.on('error', next); }); busboy.on('finish', next); + busboy.on('error', next); + req.pipe(busboy); }