Skip to content

Commit

Permalink
fix: add null check to exemplar data
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Mota committed Mar 2, 2022
1 parent 7528375 commit 3915bbf
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 3915bbf

Please sign in to comment.