diff --git a/lib/cartodb/middleware/error-middleware.js b/lib/cartodb/middleware/error-middleware.js index 52501e5d..a17af805 100644 --- a/lib/cartodb/middleware/error-middleware.js +++ b/lib/cartodb/middleware/error-middleware.js @@ -20,7 +20,7 @@ module.exports = function errorMiddleware (/* options */) { if (err.message === 'Tile does not exist' && res.locals.format === 'mvt') { statusCode = 204; } - + debug('[%s ERROR] -- %d: %s, %s', label, statusCode, err, err.stack); // If a callback was requested, force status to 200 @@ -33,7 +33,6 @@ module.exports = function errorMiddleware (/* options */) { errors_with_context: allErrors.map(errorMessageWithContext) }; - res.status(statusCode); if (req.query && req.query.callback) { @@ -191,4 +190,4 @@ function logErrors(errors, statusCode, res) { }); res.set('X-Tiler-Errors', JSON.stringify(errorsLog)); -} \ No newline at end of file +}