From acc16de07b6ec2fd5a6c1f18dd4d527f03d1ba74 Mon Sep 17 00:00:00 2001 From: Igor Date: Thu, 13 Nov 2025 16:05:30 +0100 Subject: [PATCH] Log warning when metric not present instead of raising exception --- quasardb/stats.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/quasardb/stats.py b/quasardb/stats.py index 32dc90d1..50e6e516 100644 --- a/quasardb/stats.py +++ b/quasardb/stats.py @@ -326,7 +326,8 @@ def _by_uid( continue if not metric in idx: - raise Exception(f"Metric not in internal index: {metric}") + logger.warning("Metric not in internal index: %s", metric) + continue # Parse user id uid = int(uid_str) @@ -362,7 +363,8 @@ def _cumulative( continue if not metric in idx: - raise Exception(f"Metric not in internal index: {metric}") + logger.warning("Metric not in internal index: %s", metric) + continue x = idx[metric].copy() x["value"] = v