Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Bridge.getVector = function(source, map, z, x, y, callback) {
// are out of bounds at zoom-level z
var vtile = new mapnik.VectorTile(+z,+x,+y, {buffer_size:16*map.bufferSize});
} catch(err) {
return callback(err, null, headers);
return callback(invalid(err.message, null, headers));
}

map.extent = vtile.extent();
Expand Down Expand Up @@ -465,3 +465,9 @@ Bridge.prototype.getIndexableDocs = function(pointer, callback) {
feature();
});
};

function invalid(msg) {
var err = new Error(msg);
err.code = 'EINVALID';
return err;
}