Small fixes to the 'generateCache' script

This commit is contained in:
Pieter Vander Vennet 2021-10-03 02:11:06 +02:00
parent 5bcb879dfe
commit 23136f7e7a
4 changed files with 11 additions and 14 deletions

View file

@ -42,7 +42,7 @@ export class Overpass {
}
const self = this;
const json = await Utils.downloadJson(query)
console.log("Got json!", json)
if (json.elements.length === 0 && json.remark !== undefined) {
console.warn("Timeout or other runtime error while querying overpass", json.remark);
throw `Runtime error (timeout or similar)${json.remark}`