---
summary: "McpError code/data preservation in rethrowSanitized; totalCount enrichment on openfec_search_legal"
breaking: false
security: false
---

# 0.4.10 — 2026-06-04

## Fixed

- **`rethrowSanitized`** — `McpError` instances from `fetchWithTimeout` are now re-thrown as `McpError` (preserving `code` and `data`) instead of being wrapped into a plain `Error`. Previously, HTTP 422 responses were misclassified as `InternalError` instead of `ValidationError`; 404/429 codes were similarly stripped. (#4)
- **`openfec_search_legal` enrichment** — `totalCount` is now declared in the enrichment schema and set via `ctx.enrich.total()`, aligning with all eight other tools. Clients reading `enrichment.totalCount` no longer receive `undefined`. (#6)
