Skip to content

3.1.0

Latest

Choose a tag to compare

@makoni makoni released this 21 Aug 19:22
9f2bddc

Error handling (#46)

  • delete():
    • 409 conflict now throws .conflictError(error:) (previously DecodingError), consistent with update()
    • Empty response body now throws .noData (previously: silent ok: false response)
    • 400/412/5xx error payloads now throw .deleteError(error:) (previously: raw DecodingError)
  • insert(): 409 conflict now throws .conflictError(error:) (previously .insertError(error:)) — the conflict retry loop now works uniformly for insert/update/delete

Response size limit

New Config.maxResponseBytes (default: 10 MB): the client no longer trusts a server-declared Content-Length above the cap — oversized responses throw NIOTooManyBytesError without buffering, preventing unbounded memory growth from a malicious or misconfigured server.

Documentation

  • ErrorsHandling tutorial: new step on handling delete conflicts
  • Corrected doc comments for insert/update/delete to match actual error behavior
  • README: maxResponseBytes in the Config examples

Behavior changes (3.0.2 → 3.1.0)

  1. delete(): 409 → .conflictError, empty body → .noData, 400/412/5xx → .deleteError(error:)
  2. insert(): 409 → .conflictError
  3. Responses larger than 10 MB (default) throw NIOTooManyBytesError instead of being buffered; configure via Config(maxResponseBytes:)

Full Changelog