Skip to content

Commit

Permalink
fix max retry issue in RemoveObject() (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericychoi authored and harshavardhana committed Nov 24, 2016
1 parent 0cd90f4 commit fefbf34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api-remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ func (c Client) RemoveObject(bucketName, objectName string) error {
if err != nil {
return err
}
if resp != nil {
// if some unexpected error happened and max retry is reached, we want to let client know
if resp.StatusCode != http.StatusNoContent {
return httpRespToErrorResponse(resp, bucketName, objectName)
}
}

// DeleteObject always responds with http '204' even for
// objects which do not exist. So no need to handle them
// specifically.
Expand Down

0 comments on commit fefbf34

Please sign in to comment.