don't ignore errors from fetch().then()
authorgregor herrmann <gregor@toastfreeware.priv.at>
Thu, 6 Sep 2018 15:58:06 +0000 (17:58 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Thu, 6 Sep 2018 15:58:06 +0000 (17:58 +0200)
web/static/seepark_web.js

index 2aad39b6c1505f9796decbad2abb53d85c46c241..5baed88ef6574727e0c28753ef4bfb34fd6cc494 100644 (file)
@@ -223,7 +223,7 @@ setInterval(
                                airtime.innerText  = strftime('%Y-%m-%d H:%M', data['timestamp']);
                        })
                        .catch(function(error) {
-                               // handle error
+                               console.log(error);
                        });
                fetch(api_url_currentwater)
                        .then((resp) => resp.json())
@@ -232,7 +232,7 @@ setInterval(
                                watertime.innerText  = strftime('%Y-%m-%d H:%M', data['timestamp']);
                        })
                        .catch(function(error) {
-                               // handle error
+                               console.log(error);
                        });
        },
        refresh_interval