Skip to content

v0.2.1

Latest

Choose a tag to compare

@jasonjhofmann jasonjhofmann released this 11 Jun 04:57
· 3 commits to main since this release
b96fcbf

Error-contract hardening from the remaining v0.1.0 audit findings. No API changes.

Fixed

  • get_bytes (binary attachment downloads) no longer leaks a raw TimeoutError — timeouts are now retried and, once retries are exhausted, wrapped in AranetConnectionError, matching the JSON path and the documented "all errors derive from AranetError" contract.
  • The polite-spacing floor (_respect_min_interval) now runs before every attempt of a binary download, not just once before the retry loop, so retries can no longer hammer the API back-to-back.
  • A 200 response whose body is valid JSON but not an object (e.g. a top-level array or string) now raises AranetServerError instead of surfacing later as an AttributeError outside the exception hierarchy.
  • AranetRateLimitError.retry_after is now populated from the final 429 response's Retry-After header (the value already honoured for backoff) instead of attempting to float() the response body, which effectively always yielded None.

Full Changelog: v0.2.0...v0.2.1