ClickHouse / ClickHouse/clickhouse-java

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

Đang mở
#2,287 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:error-handling bug client-api-v2
Ngôn ngữ chính
Java
Star
1.6k
Fork
636
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
29

Mô tả

### 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"
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.