ClickHouse / ClickHouse/clickhouse-java

If received NetException from ClickHouse in response body, it will be ignored and unrecognized

オープン
#2,287 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:error-handling bug client-api-v2
主要言語
Java
スター
1.6k
フォーク
636
平均マージ
2日 23時間
マージ済み PR(30日)
29

説明

### Describe the bug
The ClickHouse Java driver suppresses error messages that contain `DB::NetException` due to a hardcoded substring match for `DB::Exception`.
In log we receiving Caused by: com.clickhouse.client.api.ServerException: Code: 279. DB::Exception: (transport error: 500)

This causes legitimate network-related errors to be hidden, making debugging difficult.

### Steps to reproduce
1. Receive `NetException` from ClickHouse in response (e.g., due to missing table in cluster -> cluster integration or any network failure).

### Expected behaviour
The error message containing `DB::NetException` should be properly logged and exposed to the client, similar to `DB::Exception`.

### Code example
```java
// Relevant source in the driver
// https://github.com/ClickHouse/clickhouse-java/blob/main/client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java#L316C33-L316C58

// The current implementation expects only "DB::Exception"
// But actual response contains "DB::NetException"
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Inspect client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java around line 316, where the response error text is recognized. Reproduce a response containing DB::NetException and verify that its message is logged and exposed to the client like DB::Exception. Done means network-related ClickHouse errors are no longer suppressed.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。