Commit 9c705ffd authored by code1305's avatar code1305 Committed by Anshul
Browse files

err fix if target creation fails

return right error if any target creation fails. Need to wrap the right error.
Signed-off-by: default avatarAnshul <>
parent 80545bfb
......@@ -373,7 +373,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
var tg targetgroup.Group
for tgt := range ch {
if tgt.err != nil {
return nil, errors.Wrap(err, "unable to complete Azure service discovery")
return nil, errors.Wrap(tgt.err, "unable to complete Azure service discovery")
if tgt.labelSet != nil {
tg.Targets = append(tg.Targets, tgt.labelSet)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment