Catch incorrect header exceptions
This commit is contained in:
parent
27eb7f0ed8
commit
a0eb5800fd
1 changed files with 6 additions and 1 deletions
|
@ -188,7 +188,12 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (format == 'pbf') {
|
if (format == 'pbf') {
|
||||||
|
try {
|
||||||
response.data = zlib.unzipSync(data);
|
response.data = zlib.unzipSync(data);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.log("Skipping incorrect header for tile mbtiles://openmaptiles/%z/%x/%y.pbf", z, x, y);
|
||||||
|
}
|
||||||
if (options.dataDecoratorFunc) {
|
if (options.dataDecoratorFunc) {
|
||||||
response.data = options.dataDecoratorFunc(
|
response.data = options.dataDecoratorFunc(
|
||||||
sourceId, 'data', response.data, z, x, y);
|
sourceId, 'data', response.data, z, x, y);
|
||||||
|
|
Loading…
Reference in a new issue