Skip to content

Commit

Permalink
Add error handlers for parser errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Dries Staelens committed Jun 28, 2017
1 parent b9ee66e commit 0713f6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0713f6f

Please sign in to comment.