mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
discovery/marathon: include url in fetchApps error (#4171)
This was previously part of a larger PR, but that was closed. https://github.com/prometheus/prometheus/issues/4048#issuecomment-389899997 This change could include auth information in the URL. That's been fixed in upstream go, but not until Go 1.11. See: https://github.com/golang/go/issues/24572 Signed-off-by: Adam Shannon <adamkshannon@gmail.com>
This commit is contained in:
parent
986674a790
commit
a22e1736b9
|
@ -344,7 +344,11 @@ func fetchApps(client *http.Client, url string) (*AppList, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
return parseAppJSON(body)
|
||||
apps, err := parseAppJSON(body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%v in %s", err, url)
|
||||
}
|
||||
return apps, nil
|
||||
}
|
||||
|
||||
func parseAppJSON(body []byte) (*AppList, error) {
|
||||
|
|
Loading…
Reference in a new issue