lib/snapshot: fix error message format for failed HTTP request (#3559)

This commit is contained in:
Zakhar Bessarab 2022-12-28 21:04:11 +04:00 committed by GitHub
parent 34c705988e
commit c612bb165e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ func Create(createSnapshotURL string) (string, error) {
return "", err return "", err
} }
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
return "", fmt.Errorf("unexpected status code returned from %q; expecting %d; got %d; response body: %q", createSnapshotURL, resp.StatusCode, http.StatusOK, body) return "", fmt.Errorf("unexpected status code returned from %q; expecting %d; got %d; response body: %q", createSnapshotURL, http.StatusOK, resp.StatusCode, body)
} }
snap := snapshot{} snap := snapshot{}