From 2a3429b594a62f0d8d114977ab93521a803aaadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sat, 7 Mar 2026 22:10:05 -0800 Subject: [PATCH] fix(chdb): add connection name to ClickHouse error messages Wrap logs/scores connection errors with their name so it's clear which connection failed on startup. --- chdb/db.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chdb/db.go b/chdb/db.go index 420a11e..2aea28b 100644 --- a/chdb/db.go +++ b/chdb/db.go @@ -2,6 +2,7 @@ package chdb import ( "context" + "fmt" "os" "strings" "time" @@ -67,11 +68,11 @@ func setupClickhouse(ctx context.Context, configFile string) (*ClickHouse, error ch.Logs, err = open(ctx, cfg.ClickHouse.Logs) if err != nil { - return nil, err + return nil, fmt.Errorf("logs: %w", err) } ch.Scores, err = open(ctx, cfg.ClickHouse.Scores) if err != nil { - return nil, err + return nil, fmt.Errorf("scores: %w", err) } return ch, nil