Skip to content

v2.7.1

@cyanheads cyanheads tagged this 20 May 03:16
`pubmed_europepmc_search` now surfaces silent EPMC rejections as
ValidationError instead of falling through to a fake 0-hit response.
EPMC returns a `{ version }`-only envelope when it rejects an
undocumented `sort` field, and a `{ errCode, errMsg }` shape when it
rejects structured input (e.g. empty query); both formerly normalized
to `hitCount: 0` with no signal to the caller.

`EuropePmcService.search` detects both shapes and throws
`ValidationError` with `data.reason: "europepmc_invalid_input"`. The
empty-envelope branch emits a sort-aware recovery hint listing the
documented sortable fields (`P_PDATE_D`, `CITED`, `AUTH_FIRST`,
`PUB_YEAR`). The `sort` description in `pubmed_europepmc_search` no
longer cites the silently-rejected `FIRST_PIDATE desc` as an example.

New contract `europepmc_invalid_input` (`ValidationError`, non-retryable)
in `EUROPEPMC_SERVICE_ERRORS`. `EuropePmcSearchResponse` gains optional
`errCode` / `errMsg` fields.

Deps: `@types/node` ^25.9.0 → ^25.9.1.

623 tests pass (4 skipped); `bun run devcheck` clean.
Assets 2
Loading