Skip to content

v0.1.11: Typed error contracts, empty getData structured result

Choose a tag to compare

@cyanheads cyanheads released this 04 Jun 08:38
v0.1.11
2c98eb6

Typed error contracts, empty getData structured result

Tools now surface recovery.hint on the wire for all declared error reasons.
getData returns a structured empty result instead of throwing when the WB API returns no observations.

Fixed:

  • worldbank_get_country, worldbank_get_indicator: service-layer errors caught and re-thrown via ctx.fail(), populating data.recovery.hint (#10)
  • worldbank_get_data: indicator_not_found and country_not_found re-thrown via ctx.fail(); no_data contract entry removed (#10)
  • worldbank_get_data: empty items array returns structured result (data: [], paging totals in enrichment) instead of throwing (#9)
  • worldbank_list_countries: errors[] contract added for invalid_filter; handler catches service throw and re-routes via ctx.fail() (#11)

134 tests pass; bun run devcheck clean.