diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-07-15 20:34:00 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-07-15 20:34:00 +0200 |
commit | 83f54386b7877ec66c70b79962d3cd73a17ac8a5 (patch) | |
tree | fec84d2a72685f355c27ef393523f39c7fbe23a5 /static/v0/js/geolocation.js | |
parent | e258e3e1eb2d2dafc92c016253fd29d48869af73 (diff) |
add error handling for hafas and efa requests
Diffstat (limited to 'static/v0/js/geolocation.js')
-rw-r--r-- | static/v0/js/geolocation.js | 6 |
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"); |