From ff5bee1f7958dc27a037aa8dc748239a521916ac Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Thu, 13 Apr 2017 00:51:39 +0000 Subject: [PATCH] Add notice when fetching error --- titanembeds/static/js/embed.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/titanembeds/static/js/embed.js b/titanembeds/static/js/embed.js index 685aa53..fed556a 100644 --- a/titanembeds/static/js/embed.js +++ b/titanembeds/static/js/embed.js @@ -371,7 +371,8 @@ } }); fet.catch(function(data) { - if (data.status != 403 && data.status != 401) { + if (500 <= data.status < 600) { + Materialize.toast('Fetching messages error! Webserver down?', 10000); fetchtimeout = setTimeout(run_fetch_routine, 10000); } });