From 83f54386b7877ec66c70b79962d3cd73a17ac8a5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 15 Jul 2021 20:34:00 +0200 Subject: add error handling for hafas and efa requests --- templates/departure_list.html | 9 +++++++++ templates/landing_page.html | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'templates') diff --git a/templates/departure_list.html b/templates/departure_list.html index 3762a03..42ce550 100644 --- a/templates/departure_list.html +++ b/templates/departure_list.html @@ -10,6 +10,15 @@
+ {% if warning %} +
+
+ {{ warning["lead"] }} + {{ warning["body"] }} +
{{ warning["code"] }}
+
+
+ {% endif %} {% if not departures %}
Keine Abfahrten innerhalb der nächsten zwei Stunden
{% endif %} diff --git a/templates/landing_page.html b/templates/landing_page.html index c5a04fd..b6a28cd 100644 --- a/templates/landing_page.html +++ b/templates/landing_page.html @@ -8,6 +8,15 @@ {% include 'navbar.html' %}
+ {% if error %} +
+
+ {{ error["lead"] }} + {{ error["body"] }} +
{{ error["code"] }}
+
+
+ {% endif %}
-- cgit v1.2.3