Error handling (#46)
delete():- 409 conflict now throws
.conflictError(error:)(previouslyDecodingError), consistent withupdate() - Empty response body now throws
.noData(previously: silentok: falseresponse) - 400/412/5xx error payloads now throw
.deleteError(error:)(previously: rawDecodingError)
- 409 conflict now throws
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
deleteconflicts - Corrected doc comments for
insert/update/deleteto match actual error behavior - README:
maxResponseBytesin the Config examples
Behavior changes (3.0.2 → 3.1.0)
delete(): 409 →.conflictError, empty body →.noData, 400/412/5xx →.deleteError(error:)insert(): 409 →.conflictError- Responses larger than 10 MB (default) throw
NIOTooManyBytesErrorinstead of being buffered; configure viaConfig(maxResponseBytes:)