postgres: better error handling (#80375)

This commit is contained in:
Gábor Farkas
2024-01-15 12:50:01 +01:00
committed by GitHub
parent a3b9ec21db
commit 6a36525d61

View File

@ -105,7 +105,8 @@ func (s *Service) newInstanceSettings(cfg *setting.Cfg) datasource.InstanceFacto
if sdkproxy.New(proxyOpts).SecureSocksProxyEnabled() {
driverName, err = createPostgresProxyDriver(cnnstr, proxyOpts)
if err != nil {
return "", nil
logger.Error("postgres proxy creation failed", "error", err)
return nil, fmt.Errorf("postgres proxy creation failed")
}
}