moving logErrors to right position

This commit is contained in:
Simon Martín 2017-11-27 16:55:11 +01:00
parent e041b5b8a9
commit e7b8d9b223

View File

@ -15,12 +15,11 @@ module.exports = function errorMiddleware (/* options */) {
var statusCode = findStatusCode(err);
logErrors(allErrors, statusCode, res);
if (err.message === 'Tile does not exist' && res.locals.format === 'mvt') {
statusCode = 204;
}
logErrors(allErrors, statusCode, res);
debug('[%s ERROR] -- %d: %s, %s', label, statusCode, err, err.stack);
// If a callback was requested, force status to 200