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') {
|
||||
response.data = zlib.unzipSync(data);
|
||||
try {
|
||||
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) {
|
||||
response.data = options.dataDecoratorFunc(
|
||||
sourceId, 'data', response.data, z, x, y);
|
||||
|
|
Loading…
Reference in a new issue