summaryrefslogtreecommitdiff
path: root/static/v0/js/geolocation.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-15 20:34:00 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-15 20:34:00 +0200
commit83f54386b7877ec66c70b79962d3cd73a17ac8a5 (patch)
treefec84d2a72685f355c27ef393523f39c7fbe23a5 /static/v0/js/geolocation.js
parente258e3e1eb2d2dafc92c016253fd29d48869af73 (diff)
add error handling for hafas and efa requests
Diffstat (limited to 'static/v0/js/geolocation.js')
-rw-r--r--static/v0/js/geolocation.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/static/v0/js/geolocation.js b/static/v0/js/geolocation.js
index 1ea4ee5..4f520b9 100644
--- a/static/v0/js/geolocation.js
+++ b/static/v0/js/geolocation.js
@@ -11,6 +11,12 @@ document.addEventListener("DOMContentLoaded", function() {
const processResult = function(results) {
const list = document.createElement("ul");
list.className = "stops";
+
+ if (results.error) {
+ showError("Backend-Fehler:", results.msg);
+ return;
+ }
+
for (var result in results) {
result = results[result];
const listentry = document.createElement("li");