fix(clients): handle 204 No Content responses across language clients#6096
Merged
Fluf22 merged 8 commits intofix/generatorsfrom May 1, 2026
Merged
fix(clients): handle 204 No Content responses across language clients#6096Fluf22 merged 8 commits intofix/generatorsfrom
Fluf22 merged 8 commits intofix/generatorsfrom
Conversation
Collaborator
✔️ Code generated!
📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
7dc84db to
722b512
Compare
e765f58 to
8d97ba9
Compare
722b512 to
802f74f
Compare
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
TIP This summary will be updated as you push new changes.
802f74f to
adea416
Compare
b939685 to
2e8e0a1
Compare
Add test server on port 6691 returning 204 with empty body, and a common client test asserting customDelete returns null without crashing.
CTS revealed customDelete passes klass=object (not None), so the klass is None check doesn't cover 204 responses. Add data == '' guard.
Add status code and empty body guards to prevent deserialization crashes on HTTP 204: - JS: response.status === 204 || content.length === 0 in helpers.ts - Java: restore contentLength() == 0, add response.code() == 204 in HttpRequester - Scala: response.code == 204 check in HttpRequester - PHP: 204 === $statusCode || $body === '' before json_decode - Dart: response.statusCode == 204 ? null : response.body - Kotlin: response.status.value == 204 || contentLength() == 0L
…ng with gzipResponse on 6691)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extracted from #6055 — fixes deserialization crashes on HTTP 204 responses.
Changes
customDeletereturns null