Skip to content

Commit

Permalink
Handle exception when retrieving pods
Browse files Browse the repository at this point in the history
  • Loading branch information
qjoly committed Mar 9, 2024
1 parent f32751a commit 7a49beb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions evil-tea/src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ def get_all_pods():
@app.route('/')
def index():
# Récupérer la liste des pods de tous les namespaces
pods = get_all_pods()

try:
pods = get_all_pods()
except Exception as e:
return f"Error: {e}"

# Formater les données pour l'affichage dans le template HTML
formatted_pods = []
for pod in pods.items:
Expand Down

0 comments on commit 7a49beb

Please sign in to comment.