Skip to content

Commit

Permalink
fix: add null check to exemplar data (#5202)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mota <tmm@danskecommodities.com>
  • Loading branch information
tomasmota authored Mar 2, 2022
1 parent 7528375 commit efcdf5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/exemplars/exemplars.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func (rr *GRPCClient) Exemplars(ctx context.Context, req *exemplarspb.ExemplarsR
return nil, nil, errors.Wrap(err, "proxy Exemplars")
}

if resp.data == nil {
return make([]*exemplarspb.ExemplarData, 0), resp.warnings, nil
}

resp.data = dedupExemplarsResponse(resp.data, rr.replicaLabels)
return resp.data, resp.warnings, nil
}
Expand Down

0 comments on commit efcdf5e

Please sign in to comment.