Spaces:
Running
Running
add error message for db connection
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def get_data():
|
|
27 |
conn.close()
|
28 |
return df
|
29 |
except Exception as e:
|
30 |
-
st.error("Failed to connect to the database: {e}")
|
31 |
st.stop()
|
32 |
|
33 |
# Load data
|
|
|
27 |
conn.close()
|
28 |
return df
|
29 |
except Exception as e:
|
30 |
+
st.error(f"Failed to connect to the database: {e}")
|
31 |
st.stop()
|
32 |
|
33 |
# Load data
|