Fix: List index bug in outlier detection, add error logging
Bug #1: Fixed IndexError in outlier_detection.py:256 - Missing enumerate() caused stale loop var to access beyond bounds - Occurred when hard bounds filtered deals before IQR processing - Added test reproducing exact scenario (21 deals → 8 filtered) Bug #2: Added stack traces to all MCP tool error logs - Added exc_info=True to 10 MCP tools' error handlers - Improves debugging by logging full stack traces 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -253,7 +253,7 @@ def filter_deals_for_analysis(
|
||||
if metric == "price_per_sqm":
|
||||
values = [
|
||||
deal.price_per_sqm
|
||||
for deal in deals
|
||||
for i, deal in enumerate(deals)
|
||||
if deal.price_per_sqm is not None and not filters_to_remove[i]
|
||||
]
|
||||
value_indices = [
|
||||
|
||||
Reference in New Issue
Block a user