fix formatting issue of encoded url

Signed-off-by: Sam <samashah@microsoft.com>
(cherry picked from commit ee76ac8f93)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sam 2019-09-12 20:12:15 +00:00 committed by Sebastiaan van Stijn
parent ab4a5cc0f7
commit 5761759e43
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 2 deletions

View File

@ -243,9 +243,9 @@ func getWithStatusError(url string) (resp *http.Response, err error) {
body, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
return nil, errors.Wrapf(err, msg+": error reading body")
return nil, errors.Wrapf(err, "%s: error reading body", msg)
}
return nil, errors.Errorf(msg+": %s", bytes.TrimSpace(body))
return nil, errors.Errorf("%s: %s", msg, bytes.TrimSpace(body))
}
// GetContextFromLocalDir uses the given local directory as context for a