You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem in the issue points to the scenario when error can be in response with status 200 (SUCCESS).
This PR adds verification tests that error still parsed and exception thrown.
Low Risk
Test-only change in HttpTransportTests; no runtime behavior modified.
Overview
Adds integration coverage for ClickHouse HTTP responses that return 200 OK while still signaling a server error via X-ClickHouse-Exception-Code.
The new testErrorWhenResponseIsOk WireMock test stubs HTTP 200 with exception code 60 and asserts the v2 client throws ServerException with code 60. A data provider runs two cases: a normal error body is surfaced in the message, and an empty body yields the <Unreadable error message> placeholder. The test imports ClickHouseHttpProto.HEADER_EXCEPTION_CODE for the stub header name.
No production/client logic changes—tests only, tied to issue #2867.
Reviewed by Cursor Bugbot for commit 90ce7dd. Bugbot is set up for automated code reviews on this repo. Configure here.
Repository collaborators can run the JMH benchmark suite against this PR by commenting:
/benchmark
Optional regression threshold override (Δ% on Time or Alloc/op; defaults to 10%):
/benchmark threshold=15
Only one benchmark run per PR is active at a time — issuing a new /benchmark comment cancels the previous run. After the run finishes a separate comment will be posted comparing it against the latest scheduled run on main; the PR check fails if any benchmark regresses by more than the threshold.
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
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
The problem in the issue points to the scenario when error can be in response with status 200 (SUCCESS).
This PR adds verification tests that error still parsed and exception thrown.
Closes: #2867
Checklist
Delete items not relevant to your PR:
Note
Low Risk
Test-only change in HttpTransportTests; no runtime behavior modified.
Overview
Adds integration coverage for ClickHouse HTTP responses that return 200 OK while still signaling a server error via
X-ClickHouse-Exception-Code.The new
testErrorWhenResponseIsOkWireMock test stubs HTTP 200 with exception code60and asserts the v2 client throwsServerExceptionwith code 60. A data provider runs two cases: a normal error body is surfaced in the message, and an empty body yields the<Unreadable error message>placeholder. The test importsClickHouseHttpProto.HEADER_EXCEPTION_CODEfor the stub header name.No production/client logic changes—tests only, tied to issue #2867.
Reviewed by Cursor Bugbot for commit 90ce7dd. Bugbot is set up for automated code reviews on this repo. Configure here.