diff --git a/src/routes/filemanager.js b/src/routes/filemanager.js index fd34814cb..f01537252 100644 --- a/src/routes/filemanager.js +++ b/src/routes/filemanager.js @@ -38,7 +38,7 @@ function proxy(kind) { const fileManagerProxy = middleware.proxy(proxyOptions); fileManagerProxy(req, res, function (error) { - if (!error) return next(); + if (!error) return; // note: response was already sent by proxy by this point if (error.code === 'ECONNREFUSED') return next(new HttpError(424, 'Unable to connect to filemanager server')); if (error.code === 'ECONNRESET') return next(new HttpError(424, 'Unable to query filemanager server'));