return more descriptive errors
diff --git a/openstack/storage/v1/objects/objects.go b/openstack/storage/v1/objects/objects.go
index 4cf3d2d..cd248c8 100644
--- a/openstack/storage/v1/objects/objects.go
+++ b/openstack/storage/v1/objects/objects.go
@@ -58,7 +58,6 @@
type GetOpts struct {
Container string
Name string
- Headers map[string]string
Params map[string]string
}
@@ -120,7 +119,10 @@
var body []byte
defer dr.Body.Close()
body, err := ioutil.ReadAll(dr.Body)
- return body, err
+ if err != nil {
+ return body, fmt.Errorf("Error trying to read DownloadResult body: %v", err)
+ }
+ return body, nil
}
// ExtractMetadata is a function that takes a GetResult (of type *http.Response)