fix(proxy): avoid logging raw activity errors

This commit is contained in:
AxelRay 2026-10-06 08:05:48 +08:00
parent 1527acf6b9
commit 7e3e27d582

View file

@ -1005,7 +1005,7 @@ async def get_daily_activity(
),
)
except Exception as exc:
verbose_proxy_logger.exception("Error fetching daily activity: %s", exc)
verbose_proxy_logger.error("Error fetching daily activity (%s)", type(exc).__name__)
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail={"error": f"Failed to fetch analytics: {exc}"}
)
@ -1121,7 +1121,7 @@ async def get_daily_activity_aggregated(
),
)
except Exception as exc:
verbose_proxy_logger.exception("Error fetching aggregated daily activity: %s", exc)
verbose_proxy_logger.error("Error fetching aggregated daily activity (%s)", type(exc).__name__)
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail={"error": f"Failed to fetch analytics: {exc}"}
)