Spaces:
Sleeping
Sleeping
Claude Code Claude Code commited on
Commit ·
ec76dfd
1
Parent(s): 6f1c44e
fix: Add error handling to get_analytics_summary
Browse filesCo-Authored-By: Claude Code <noreply@anthropic.com>
app.py
CHANGED
|
@@ -1227,7 +1227,11 @@ def get_analytics_summary() -> str:
|
|
| 1227 |
"""Get the conversation analytics summary"""
|
| 1228 |
if not ANALYTICS_AVAILABLE or analytics is None:
|
| 1229 |
return "### 📊 Analytics\n\nAnalytics module not available."
|
| 1230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1231 |
|
| 1232 |
|
| 1233 |
def refresh_analytics() -> str:
|
|
|
|
| 1227 |
"""Get the conversation analytics summary"""
|
| 1228 |
if not ANALYTICS_AVAILABLE or analytics is None:
|
| 1229 |
return "### 📊 Analytics\n\nAnalytics module not available."
|
| 1230 |
+
try:
|
| 1231 |
+
return analytics.get_summary()
|
| 1232 |
+
except Exception as e:
|
| 1233 |
+
logger.error(f"[ANALYTICS_ERROR] get_summary failed: {e}")
|
| 1234 |
+
return f"### 📊 Analytics\n\nError generating summary: {e}"
|
| 1235 |
|
| 1236 |
|
| 1237 |
def refresh_analytics() -> str:
|