From a95748b1681ed601b0a0304c22e93957b8ed1a04 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 20 Mar 2016 19:29:50 +0000 Subject: [PATCH] Handle overpass errors reported as remarks Not all overpass errors are reported as HTTP errors - some are reported as HTTP success with a remark in the response. Fixes #1178 --- app/assets/javascripts/index/query.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 86f24e046..d3fa8ad83 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -226,6 +226,12 @@ OSM.Query = function(map) { } } + if (results.remark) { + $("
  • ") + .text(I18n.t("javascripts.query.error", { server: url, error: results.remark })) + .appendTo($ul); + } + if ($ul.find("li").length === 0) { $("
  • ") .text(I18n.t("javascripts.query.nothing_found")) -- 2.43.2