Tempo: fix handling of trace-not-found cases (#34219)

This commit is contained in:
Gábor Farkas 2021-05-18 08:33:53 +02:00 committed by GitHub
parent b9eab37149
commit bd4afe41ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ func (e *tempoExecutor) DataQuery(ctx context.Context, dsInfo *models.DataSource
}
if resp.StatusCode != http.StatusOK {
queryResult.ErrorString = fmt.Sprintf("failed to get trace with id: %s Status: %s Body: %s", traceID, resp.Status, string(body))
queryResult.Error = fmt.Errorf("failed to get trace with id: %s Status: %s Body: %s", traceID, resp.Status, string(body))
return plugins.DataResponse{
Results: map[string]plugins.DataQueryResult{
refID: queryResult,