diff --git a/pkg/registry/apis/query/parser.go b/pkg/registry/apis/query/parser.go index 98ae81fbd64..dabd8d46566 100644 --- a/pkg/registry/apis/query/parser.go +++ b/pkg/registry/apis/query/parser.go @@ -208,7 +208,7 @@ func (p *queryParser) getValidDataSourceRef(ctx context.Context, ds *data.DataSo if ds.UID == "" { return nil, fmt.Errorf("missing name/uid in data source reference") } - if ds.UID == expr.DatasourceType { + if expr.IsDataSource(ds.UID) { return ds, nil } if p.legacy == nil { diff --git a/pkg/registry/apis/query/query.go b/pkg/registry/apis/query/query.go index 1bbd6ef95a5..be8b24886c8 100644 --- a/pkg/registry/apis/query/query.go +++ b/pkg/registry/apis/query/query.go @@ -147,6 +147,8 @@ func (r *queryREST) Connect(connectCtx context.Context, name string, _ runtime.O }, } + b.log.Error("Error parsing query", "refId", refID, "message", message) + responder.Object(statusCode, qdr) return }