format details

This commit is contained in:
Simon Martín 2017-11-27 16:47:45 +01:00
parent 667925c455
commit 9a8f72b8db

View File

@ -20,7 +20,7 @@ module.exports = function errorMiddleware (/* options */) {
if (err.message === 'Tile does not exist' && res.locals.format === 'mvt') { if (err.message === 'Tile does not exist' && res.locals.format === 'mvt') {
statusCode = 204; statusCode = 204;
} }
debug('[%s ERROR] -- %d: %s, %s', label, statusCode, err, err.stack); debug('[%s ERROR] -- %d: %s, %s', label, statusCode, err, err.stack);
// If a callback was requested, force status to 200 // If a callback was requested, force status to 200
@ -33,7 +33,6 @@ module.exports = function errorMiddleware (/* options */) {
errors_with_context: allErrors.map(errorMessageWithContext) errors_with_context: allErrors.map(errorMessageWithContext)
}; };
res.status(statusCode); res.status(statusCode);
if (req.query && req.query.callback) { if (req.query && req.query.callback) {
@ -191,4 +190,4 @@ function logErrors(errors, statusCode, res) {
}); });
res.set('X-Tiler-Errors', JSON.stringify(errorsLog)); res.set('X-Tiler-Errors', JSON.stringify(errorsLog));
} }