Repository navigation
@outburn/fhir-client 1.6.0
This release includes two improvements to error handling and paginated search behavior.
HTTP Error Redaction
HTTP transport failures from the main public API surface are now normalized to FhirClientError instead of exposing raw Axios errors.
This improves security and privacy by preventing request configuration, nested authentication objects, and other Axios internals from appearing in serialized error payloads. Consumers should use the supported FhirClientError fields:
statusheadersoperationOutcomerequest
Consumers that relied on Axios-specific error fields should update to this safe error contract.
Search Transforms for Paginated Results
Paginated searches now support per-resource projection and filtering with fetchAll: true:
client.search(
'Patient',
{},
{
fetchAll: true,
transform: (resource, mode, index, entry) => {
// Return a transformed resource, or undefined to filter it out.
return resource;
},
},
);The transformer runs sequentially for every encountered Bundle.entry[].resource, including _include and _revinclude resources. It receives (resource, mode, index, entry).
Returning undefined removes an item from the final result. If the transformer throws or rejects, the search fails immediately.
Compatibility notes:
transformis only valid withfetchAll: true.maxResultscounts raw fetched resources before transform filtering.- Non-callable
transformvalues are rejected. - Existing bundle-returning searches are unchanged.
What's Changed
- Test/align test harness docker by @mechanik-daniel in #9
- HTTP Error Redaction by @mechanik-daniel in #10
- Feat/search transformer by @mechanik-daniel in #11
- Release/v1.6.0 by @mechanik-daniel in #12
Full Changelog: v1.5.0...v1.6.0