From: Takuya Yoshida Date: Sun, 25 Jun 2017 23:46:15 +0000 (+0900) Subject: Re-fix errorMiddleware (#3922) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=e5563843a2c063ab0295f778428183361e0aa326;p=mastodon.git Re-fix errorMiddleware (#3922) --- diff --git a/streaming/index.js b/streaming/index.js index d69f8fa19..e641c6548 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -246,7 +246,7 @@ const startWorker = (workerId) => { accountFromRequest(req, next); }; - const errorMiddleware = (err, req, res, next) => { // eslint-disable-line no-unused-vars + const errorMiddleware = (err, req, res, {}) => { log.error(req.requestId, err.toString()); res.writeHead(err.statusCode || 500, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: err.statusCode ? err.toString() : 'An unexpected error occurred' }));