Add error source (#1954)

Fixes  #1879
This commit is contained in:
Zoltán Bedi
2025-02-04 12:40:33 +01:00
committed by GitHub
parent 525217ddad
commit c2ffd31b1a
10 changed files with 164 additions and 21 deletions

View File

@@ -16,7 +16,6 @@ import (
)
var (
ErrFunctionsNotSupported = errors.New("zabbix queries with functions are not supported")
ErrNonMetricQueryNotSupported = errors.New("non-metrics queries are not supported")
)
@@ -134,7 +133,7 @@ func (ds *ZabbixDatasource) QueryData(ctx context.Context, req *backend.QueryDat
res.Frames = append(res.Frames, frames...)
}
} else {
res.Error = ErrNonMetricQueryNotSupported
res.Error = backend.DownstreamError(ErrNonMetricQueryNotSupported)
}
qdr.Responses[q.RefID] = res
}