moving logErrors to right position
This commit is contained in:
parent
e041b5b8a9
commit
e7b8d9b223
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user