Skip to content

Commit 0713f6f

Browse files
author
Dries Staelens
committed
Add error handlers for parser errors
1 parent b9ee66e commit 0713f6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,14 @@ function processMultipart(options, req, res, next) {
154154
req.files[fieldname] = [req.files[fieldname], newFile];
155155
}
156156
});
157+
158+
file.on('error', next);
157159
});
158160

159161
busboy.on('finish', next);
160162

163+
busboy.on('error', next);
164+
161165
req.pipe(busboy);
162166
}
163167

0 commit comments

Comments
 (0)