Skip to content

sdk: handle 204 No Content in writeApiResult - #53

Open
chayu163 wants to merge 1 commit into
ZSvirt:mainfrom
chayu163:fix/sdk-writeapiresult-204
Open

chayu163 wants to merge 1 commit into
ZSvirt:mainfrom
chayu163:fix/sdk-writeapiresult-204

Conversation

@chayu163

Copy link
Copy Markdown

What changed

Added a 204 branch to ZSClient.writeApiResult so a 204 No Content
response is treated as a successful empty result instead of falling through to
the unknown status code exception.

Why the change is needed

doCall already treats 200 || 204 as success and calls writeApiResult for
both. Because writeApiResult only handled 200 and 503, a 204 response
would throw ApiException("unknown status code: 204"), turning a successful
call into an error.

How the change was tested

Incremental one-branch addition; compiles cleanly. Not verified against a
running server.

Related issues

Fixes #52

Compatibility / upgrade impact

None — only adds handling for a previously unhandled success status code.

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.

[ZSvirt] bug: sdk: writeApiResult throws on 204 No Content that doCall already treats as success

1 participant