Skip to content

v0.2.5: Zero-row structured response, total/returned_count output fields

Choose a tag to compare

@cyanheads cyanheads released this 04 Jun 08:07
v0.2.5
db743ed

Zero-row structured response, total/returned_count output fields

eia_query_route now returns structured empty data on zero-row results instead of throwing, and surfaces total/returned_count in every response.

Fixed:

  • Zero-row results from eia_query_route now return { data: [], total: 0, returned_count: 0, notice: '...' } instead of throwing -32001 NotFound (#20)
  • no_data error reason narrowed to inverted-date-range path only
  • Service-layer notFound() throw now includes recovery.hint, consistent with handler path (#22)

Added:

  • total and returned_count required output fields on eia_query_route
  • notice optional field present on zero-row results with filter-adjustment guidance

169 tests pass; bun run devcheck clean.