myshirk commited on
Commit
4b5445a
·
verified ·
1 Parent(s): 35c1ade

add error message for db connection

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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