Skip to content

Commit

Permalink
NotImplemented support for Azure and addressed cleanup issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ebozduman committed Oct 6, 2020
1 parent bc846cb commit aa864b5
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 145 deletions.
11 changes: 8 additions & 3 deletions api-error-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,14 @@ func (e ErrorResponse) Error() string {
if e.Message == "" {
msg, ok := s3ErrorResponseMap[e.Code]
if !ok {
msg = fmt.Sprintf("Error response code %s.", e.Code)
if e.Code == "" {
msg = "Error Code is not set"
} else {
// No e.Code in the list of known s3 error codes
msg = fmt.Sprintf("Invalid error Code, \"%s\"", e.Code)
}
}
return msg
e.Message = msg
}
return e.Message
}
Expand All @@ -102,7 +107,7 @@ const (
// structure as error.
func httpRespToErrorResponse(resp *http.Response, bucketName, objectName string) error {
if resp == nil {
msg := "Response is empty. " + reportIssue
msg := "Empty http response. " + reportIssue
return errInvalidArgument(msg)
}

Expand Down
Loading

0 comments on commit aa864b5

Please sign in to comment.