add Internet Archive HTTPError msg
authorClaromes <claromes@hey.com>
Sun, 19 Nov 2023 17:15:31 +0000 (14:15 -0300)
committerClaromes <claromes@hey.com>
Sun, 19 Nov 2023 17:15:31 +0000 (14:15 -0300)
app.py

diff --git a/app.py b/app.py
index 539b087fc9ee8511332ddbe6c3fa6846f264b961..fc6b829859109c3edbc8d127614be1f5f9923f95 100644 (file)
--- a/app.py
+++ b/app.py
@@ -173,6 +173,13 @@ def query_api(handle, limit, offset, saved_at):
         st.error('Failed to establish a new connection with web.archive.org.')
     except UnboundLocalError:
         st.empty()
+    except requests.exceptions.HTTPError:
+        st.error('''
+        **Temporarily Offline**
+        
+        Internet Archive services are temporarily offline. Please check Internet Archive [Twitter feed](https://twitter.com/internetarchive/) for the latest information.
+        ''')
+        st.stop()
 
 @st.cache_data(ttl=1800, show_spinner=False)
 def parse_links(links):