Return proper "not found" error when utfgrid tables are missing.

This commit is contained in:
Will White
2011-06-23 13:43:05 -04:00
parent 3d87da5920
commit c0ed6d34ec
2 changed files with 1 additions and 1 deletions

View File

@@ -240,8 +240,8 @@ MBTiles.prototype.grid = function(x, y, z, callback) {
);
},
function(err, row, rows) {
if ((!row || !row.grid) || (err && err.errno == 1)) return callback('Grid does not exist');
if (err) return callback(err);
if (!row || !row.grid) return callback('Grid does not exist');
try {
var grid = zlib.inflate(