Ensure that the next layer in the middleware handles the error

This commit is contained in:
Paul van Tilburg 2012-02-14 23:46:53 +01:00
parent 575c64b6b8
commit c7bf0458e2
1 changed files with 1 additions and 2 deletions

3
app.js
View File

@ -220,10 +220,9 @@ app.get('/draggables', function(req, res) {
// The upload controller: handles uploads from the main site. This can
// either be a file or some pasted text. After upload the controler
// redirects to the main page which includes the just uploaded file.
app.post('/draggables', function(req, res) {
app.post('/draggables', function(req, res, next) {
req.form.complete(function(err, fields, files) {
if (err) {
// FIXME: next is undefined!
next(err);
}
else {