mirror of https://github.com/prometheus/prometheus
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>pull/3880/merge
parent
986674a790
commit
a22e1736b9
|
@ -344,7 +344,11 @@ func fetchApps(client *http.Client, url string) (*AppList, error) {
|
||||||
return nil, err
|
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) {
|
func parseAppJSON(body []byte) (*AppList, error) {
|
||||||
|
|
Loading…
Reference in New Issue