Skip to content

fix(network): handle empty 204 responses - #29

Closed
minjae999 wants to merge 6 commits into
mainfrom
feature/deliver-failure-response-headers
Closed

fix(network): handle empty 204 responses#29
minjae999 wants to merge 6 commits into
mainfrom
feature/deliver-failure-response-headers

Conversation

@minjae999

@minjae999 minjae999 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • resolve JSONClient 204 responses with an empty or undecodable body as an empty JSON object
  • preserve the status code and response headers in the successful ClientResult
  • keep the existing client error contracts unchanged

Validation

  • swift test --filter SabyNetworkTest (16 tests)

Restore non-2xx decoding behavior and resolve empty 204 JSON responses as empty objects.
Keep response headers on successful client results while restoring the existing error contracts.
@minjae999 minjae999 changed the title feat(network): expose headers on client errors fix(network): handle empty 204 responses Jul 30, 2026
@minjae999 minjae999 closed this Jul 30, 2026
Refactor response handling to remove unnecessary error throw for 204 status code.
@minjae999 minjae999 reopened this Jul 30, 2026
@minjae999 minjae999 closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant