From 46c61d1b8c224347b01eedcc09ee5aa9ecb0da44 Mon Sep 17 00:00:00 2001 From: Prateek Pandey Date: Fri, 10 Aug 2018 18:39:43 +0530 Subject: [PATCH] typecast body to string to fix error format (#55) Signed-off-by: prateekpandey14 --- openebs/pkg/volume/v1alpha1/volume.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openebs/pkg/volume/v1alpha1/volume.go b/openebs/pkg/volume/v1alpha1/volume.go index bca6d75bd32..4bf230d74aa 100644 --- a/openebs/pkg/volume/v1alpha1/volume.go +++ b/openebs/pkg/volume/v1alpha1/volume.go @@ -125,8 +125,8 @@ func (v CASVolume) CreateVolume(vol v1alpha1.CASVolume) error { } code := resp.StatusCode if code != http.StatusOK { - glog.Errorf("%s: failed to create volume '%s': response: %+v", http.StatusText(code), vol.Name, data) - return fmt.Errorf("%s: failed to create volume '%s': response: %+v", http.StatusText(code), vol.Name, data) + glog.Errorf("%s: failed to create volume '%s': response: %+v", http.StatusText(code), vol.Name, string(data)) + return fmt.Errorf("%s: failed to create volume '%s': response: %+v", http.StatusText(code), vol.Name, string(data)) } glog.Infof("volume Successfully Created:\n%#v", string(data))