datasources: querier: more robust error handling, and report no errors for single-tenant (#106288)

* datasources: querier: more robust error handling, and report no error for st

* do not leak error details out

* apply the change to the real file, not just to the test
This commit is contained in:
Gábor Farkas
2025-06-16 14:12:37 +02:00
committed by GitHub
parent 7273e4ca1c
commit 5d54289509
3 changed files with 7 additions and 5 deletions
+4 -1
View File
@@ -186,7 +186,10 @@ func (r *queryREST) Connect(connectCtx context.Context, name string, _ runtime.O
// Fetch information on the grafana instance (e.g. feature toggles)
instanceConfig, err := b.clientSupplier.GetInstanceConfigurationSettings(ctx)
if err != nil {
b.log.Error("failed to get instance configuration settings", "err", err)
msg := "failed to get instance configuration settings"
b.log.Error(msg, "err", err)
responder.Error(errors.New(msg))
return
}
// Actually run the query (includes expressions)