Jon Solow commited on
Commit
5625283
·
1 Parent(s): 4a5fbf9

Try displaying rosters twice on api error

Browse files
Files changed (1) hide show
  1. src/pages/11_Scoreboard.py +7 -3
src/pages/11_Scoreboard.py CHANGED
@@ -1,5 +1,6 @@
1
  import pandas as pd
2
  import streamlit as st
 
3
 
4
  from config import DEFAULT_ICON
5
  from shared_page import common_page_config
@@ -139,9 +140,12 @@ def get_page():
139
  st.title(page_title)
140
  try:
141
  display_rosters()
142
- except Exception:
143
- st.write("Sorry error occurred loading scoreboard. Please try refreshing page.")
144
- st.stop()
 
 
 
145
 
146
 
147
  if __name__ == "__main__":
 
1
  import pandas as pd
2
  import streamlit as st
3
+ from postgrest.exceptions import APIError
4
 
5
  from config import DEFAULT_ICON
6
  from shared_page import common_page_config
 
140
  st.title(page_title)
141
  try:
142
  display_rosters()
143
+ except APIError:
144
+ try:
145
+ display_rosters()
146
+ except Exception:
147
+ st.write("Sorry error occurred loading scoreboard. Please try refreshing page.")
148
+ st.stop()
149
 
150
 
151
  if __name__ == "__main__":