Skip to content

fix(clients): handle 204 No Content responses across language clients#6096

Merged
Fluf22 merged 8 commits intofix/generatorsfrom
fix/204-no-content
May 1, 2026
Merged

fix(clients): handle 204 No Content responses across language clients#6096
Fluf22 merged 8 commits intofix/generatorsfrom
fix/204-no-content

Conversation

@Fluf22
Copy link
Copy Markdown
Collaborator

@Fluf22 Fluf22 commented Mar 12, 2026

Summary

Extracted from #6055 — fixes deserialization crashes on HTTP 204 responses.

Changes

  • CTS test infra: New test server on port 6691 returning 204 + common client test asserting customDelete returns null

@Fluf22 Fluf22 requested a review from a team as a code owner March 12, 2026 09:36
@Fluf22 Fluf22 requested review from eric-zaharia and shortcuts and removed request for a team March 12, 2026 09:36
@algolia-bot
Copy link
Copy Markdown
Collaborator

algolia-bot commented Mar 12, 2026

✔️ Code generated!

Name Link
🪓 Triggered by f7eaf241463474cac2d5fc9025979ef130611929
🍃 Generated commit db17683c98e9a62830d452b0215a718cddc85f74
🌲 Generated branch generated/fix/204-no-content
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
javascript 2415
go 2333
php 1724
csharp 1520
python 1469
java 1144
ruby 957
swift 671
scala 23

@Fluf22 Fluf22 force-pushed the feat/agent-studio-client branch from 7dc84db to 722b512 Compare March 12, 2026 13:14
@Fluf22 Fluf22 force-pushed the fix/204-no-content branch from e765f58 to 8d97ba9 Compare March 24, 2026 15:16
@Fluf22 Fluf22 force-pushed the fix/204-no-content branch from 8d97ba9 to c72c95e Compare May 1, 2026 06:15
@Fluf22 Fluf22 force-pushed the feat/agent-studio-client branch from 722b512 to 802f74f Compare May 1, 2026 06:15
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 1, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

TIP This summary will be updated as you push new changes.

@Fluf22 Fluf22 force-pushed the feat/agent-studio-client branch from 802f74f to adea416 Compare May 1, 2026 07:05
@Fluf22 Fluf22 force-pushed the fix/204-no-content branch 3 times, most recently from b939685 to 2e8e0a1 Compare May 1, 2026 08:19
Base automatically changed from feat/agent-studio-client to fix/generators May 1, 2026 12:30
Fluf22 added 8 commits May 1, 2026 16:05
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
@Fluf22 Fluf22 force-pushed the fix/204-no-content branch from 2e8e0a1 to d50d645 Compare May 1, 2026 14:33
@Fluf22 Fluf22 merged commit bf94fcb into fix/generators May 1, 2026
68 of 70 checks passed
@Fluf22 Fluf22 deleted the fix/204-no-content branch May 1, 2026 15:47
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.

2 participants