summaryrefslogtreecommitdiff
path: root/public/static/js/geotrain.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-04-03 23:41:05 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-04-03 23:41:05 +0200
commit1124fe508ea56eb28236d0bc10912504c834a455 (patch)
tree8ab42c9731dbda9a61a40a2ade4ffdc47e1cab19 /public/static/js/geotrain.js
parent630cfe75900885856ad0a30e45c4c572a7dc54c1 (diff)
geotrain: show an error message if the backend is unreachable
Diffstat (limited to 'public/static/js/geotrain.js')
-rw-r--r--public/static/js/geotrain.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/static/js/geotrain.js b/public/static/js/geotrain.js
index 9a937d1..3e0eec5 100644
--- a/public/static/js/geotrain.js
+++ b/public/static/js/geotrain.js
@@ -59,7 +59,10 @@ $(function() {
};
var processLocation = function(loc) {
- $.get('https://dbf.finalrewind.org/__geotrain/search', {lon: loc.coords.longitude, lat: loc.coords.latitude}, processResult);
+ $.get('https://dbf.finalrewind.org/__geotrain/search', {lon: loc.coords.longitude, lat: loc.coords.latitude}, processResult).fail(function(jqXHR, textStatus, errorThrown) {
+ removeStatus();
+ showError("Fehler im Zuglokalisierungs-Backend: ", textStatus, errorThrown);
+ });
$('div.candidatestatus').text('Suche Züge…');
};