Skip to content

fix(output): throw server error for streamed exceptions#336

Open
simPod wants to merge 2 commits into
masterfrom
fix/json-each-row-streamed-exceptions
Open

fix(output): throw server error for streamed exceptions#336
simPod wants to merge 2 commits into
masterfrom
fix/json-each-row-streamed-exceptions

Conversation

@simPod

@simPod simPod commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Context

ClickHouse can emit streamed exception frames after response headers. JsonEachRow currently attempts to decode those frames as JSON, surfacing a JsonException instead of the client-level ServerError.

Decision

Detect exception frames while consuming JSONEachRow lines and rethrow them through ServerError::fromResponseContent().

Consequences

  • Streaming JSONEachRow consumers preserve ClickHouse server-error semantics.
  • Both string and stream-backed JSONEachRow outputs handle streamed exception frames consistently.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.99%. Comparing base (725353b) to head (8ee28f5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #336      +/-   ##
==========================================
+ Coverage   95.94%   95.99%   +0.04%     
==========================================
  Files          42       42              
  Lines         839      848       +9     
==========================================
+ Hits          805      814       +9     
  Misses         34       34              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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