diff --git a/scripts/serverPmTileExtracts.ts b/scripts/serverPmTileExtracts.ts index e63ac2cce..09757ccc3 100644 --- a/scripts/serverPmTileExtracts.ts +++ b/scripts/serverPmTileExtracts.ts @@ -37,8 +37,8 @@ class ServerPmTileExtracts extends Script { body: string, res: ServerResponse) => { const [z,x,y] = path.split(".")[0].split("/").map(x => Number(x)) - if(z in zoomlevels){ - throw "Invalid zoomlevel, must be one of "+Array.from(Object.keys(zoomlevels)).join(", ") + if(!(z in zoomlevels)){ + throw `Invalid zoomlevel ${z} (x: ${x}, y: ${y}, must be one of ${Array.from(Object.keys(zoomlevels)).join(", ")}` } const targetFile = generator.getFilename(z, x, y)