Skip to content

[1.4] Wrap truncated-response ConnectionClosedException in DeltaSharingConnectionException - #994

Merged
charlenelyu-db merged 1 commit into
delta-io:branch-1.4from
charlenelyu-db:backport-993-1.4
Jul 22, 2026
Merged

charlenelyu-db merged 1 commit into
delta-io:branch-1.4from
charlenelyu-db:backport-993-1.4

Conversation

@charlenelyu-db

Copy link
Copy Markdown
Collaborator

When the sharing server closed the connection mid-stream (the response stream is not finished by the chunked 0\r\n\r\n terminator), the client stitched its error message into the last buffered line and returned it as valid response data. That corrupted line later surfaced as a confusing JsonParseException in maybeExtractEndStreamAction instead of a legible connection error.

Re-throw the failure wrapped in DeltaSharingConnectionException (carrying the query id for logging) so callers see a clear network error, and update the exception's doc comment to cover this mid-stream truncation case.

â€ĶectionException

When the sharing server closed the connection mid-stream (after status +
headers but before the full NDJSON body), the client stitched its error
message into the last buffered line and returned it as valid response data.
That corrupted line later surfaced as a confusing JsonParseException in
maybeExtractEndStreamAction instead of a legible connection error.

Rethrow the failure wrapped in DeltaSharingConnectionException (carrying the
query id for logging) so callers see a clear network error, and update the
exception's doc comment to cover this mid-stream truncation case.

Co-authored-by: Isaac
@charlenelyu-db
charlenelyu-db merged commit 482e7ce into delta-io:branch-1.4 Jul 22, 2026
5 checks passed
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