Skip to content

Commit

Permalink
Added exception handling for nil druid data (opstree#67)
Browse files Browse the repository at this point in the history
Signed-off-by: iamabhishek-dubey <[email protected]>
  • Loading branch information
iamabhishek-dubey authored Nov 9, 2020
1 parent 06054b9 commit b1e4779
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion listener/druid_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ func DruidHTTPEndpoint(histogram *prometheus.HistogramVec, gauge *prometheus.Gau
err = json.Unmarshal(output, &druidData)
if err != nil {
logrus.Errorf("Error decoding JSON sent by druid: %v", err)
logrus.Debugf("%v", druidData)
if druidData != nil {
logrus.Debugf("%v", druidData)
}
return
}
for i, data := range druidData {
Expand Down

0 comments on commit b1e4779

Please sign in to comment.