Respond with 204 when vector tile is empty

This commit is contained in:
Daniel García Aubert
2017-07-17 19:44:18 +02:00
parent a35b1e3e86
commit eccc3597aa
3 changed files with 73 additions and 5 deletions
+4
View File
@@ -201,6 +201,10 @@ BaseController.prototype.sendError = function(req, res, err, label) {
var statusCode = findStatusCode(err);
if (err.message === 'Tile does not exist' && req.params.format === 'mvt') {
statusCode = 204;
}
debug('[%s ERROR] -- %d: %s, %s', label, statusCode, err, err.stack);
// If a callback was requested, force status to 200