Private
Public Access
1
0

fix(chdb): add connection name to ClickHouse error messages
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

Wrap logs/scores connection errors with their name so it's
clear which connection failed on startup.
This commit is contained in:
2026-03-07 22:10:05 -08:00
parent 7d66b87387
commit 2a3429b594

View File

@@ -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