Merge pull request #2087 from shahzzzam/sam/fix-print

fix formatting issue of encoded url
This commit is contained in:
Sebastiaan van Stijn 2019-10-29 12:28:09 +01:00 committed by GitHub
commit 2eb5cdba46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -242,9 +242,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