Merge pull request #1664 from prometheus/fabxc-scheme-panic

retrieval: don't panic on non-HTTP scheme
pull/1668/head
Brian Brazil 2016-05-26 00:19:04 +01:00
commit e222e17073
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,7 @@ func targetsFromGroup(tg *config.TargetGroup, cfg *config.ScrapeConfig) ([]*Targ
case "https": case "https":
addr = fmt.Sprintf("%s:443", addr) addr = fmt.Sprintf("%s:443", addr)
default: default:
panic(fmt.Errorf("targetsFromGroup: invalid scheme %q", cfg.Scheme)) return nil, fmt.Errorf("invalid scheme: %q", cfg.Scheme)
} }
labels[model.AddressLabel] = model.LabelValue(addr) labels[model.AddressLabel] = model.LabelValue(addr)
} }