mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
Merge pull request #1664 from prometheus/fabxc-scheme-panic
retrieval: don't panic on non-HTTP scheme
This commit is contained in:
commit
e222e17073
|
@ -454,7 +454,7 @@ func targetsFromGroup(tg *config.TargetGroup, cfg *config.ScrapeConfig) ([]*Targ
|
|||
case "https":
|
||||
addr = fmt.Sprintf("%s:443", addr)
|
||||
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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue