From 2cd14f567cf06052611c0f85487aaca7c0ce3415 Mon Sep 17 00:00:00 2001 From: kannappanr <30541348+kannappanr@users.noreply.github.com> Date: Mon, 23 Jul 2018 01:39:09 -0700 Subject: [PATCH] Do not set Key and BucketName in ErrorResponse, if empty (#6174) --- cmd/api-errors.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/api-errors.go b/cmd/api-errors.go index dbcff9629..bb1cd5de9 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -40,8 +40,8 @@ type APIErrorResponse struct { XMLName xml.Name `xml:"Error" json:"-"` Code string Message string - Key string - BucketName string + Key string `xml:"Key,omitempty" json:"Key,omitempty"` + BucketName string `xml:"BucketName,omitempty" json:"BucketName,omitempty"` Resource string RequestID string `xml:"RequestId" json:"RequestId"` HostID string `xml:"HostId" json:"HostId"`