Skip to content

Commit

Permalink
Implement error interface for RemoveObjectError (#2058)
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhaochen authored Jan 29, 2025
1 parent 41664c2 commit 86f1186
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api-remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ type RemoveObjectError struct {
Err error
}

func (err *RemoveObjectError) Error() string {
// This should never happen as we will have a non-nil error with no underlying error.
if err.Err == nil {
return "unexpected remove object error result"
}
return err.Err.Error()
}

// RemoveObjectResult - container of Multi Delete S3 API result
type RemoveObjectResult struct {
ObjectName string
Expand Down

0 comments on commit 86f1186

Please sign in to comment.