Skip to content

v0.1.7: canvas_not_found contract fix

Choose a tag to compare

@cyanheads cyanheads released this 04 Jun 08:55
v0.1.7
043f95a

canvas_not_found contract fix

Both dataframe tools now correctly route canvas.acquire() NotFound errors
through ctx.fail('canvas_not_found', ...) so data.reason is set and agents
can act on the structured field.

Fixed:

  • socrata_dataframe_describe, socrata_dataframe_query: canvas_not_found contract was declared but unreachable — canvas.acquire() threw a raw NotFound with data.reason unset when an unknown canvas_id was passed (#8). Both handlers now wrap acquire() in a try/catch; for dataframe-describe, re-routing only fires when canvasIdInput !== undefined (omitting canvas_id creates a fresh canvas, not a lookup). Both changes covered by new tests.

109 tests pass; bun run devcheck clean.