yrobel-lima commited on
Commit
4b243fa
·
verified ·
1 Parent(s): 6b5afb0

Upload error_message_template.py

Browse files
Files changed (1) hide show
  1. utils/error_message_template.py +11 -2
utils/error_message_template.py CHANGED
@@ -1,6 +1,15 @@
 
 
 
 
1
  ERROR_MESSAGE = (
2
- "Something went wrong while processing your request. "
3
- "Please refresh the page or try again later.\n\n"
4
  "If the error persists, please contact us at "
5
  "[Tall Tree Health](https://www.talltreehealth.ca/contact-us)."
6
  )
 
 
 
 
 
 
1
+ from typing import Optional
2
+
3
+ import streamlit as st
4
+
5
  ERROR_MESSAGE = (
6
+ "Sorry, something went wrong. Our team is working on it.\n\n"
7
+ "Please refresh the page or try again later. "
8
  "If the error persists, please contact us at "
9
  "[Tall Tree Health](https://www.talltreehealth.ca/contact-us)."
10
  )
11
+
12
+
13
+ def handle_errors(error: Optional[Exception] = None):
14
+ st.warning(error if error else ERROR_MESSAGE, icon="🙁")
15
+ st.stop()