ClickHouse / ClickHouse/clickhouse-java

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

Abierto
#2,287 1 comentario 0 reacciones 0 asignados Ver en GitHub
area:error-handling bug client-api-v2
Lenguaje dominante
Java
Estrellas
1.6k
Forks
636
Merge medio
2 d 23 h
PR fusionados (30 d)
29

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.