-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report better s3Errors #1039
report better s3Errors #1039
Conversation
controllers/s3utils.go
Outdated
return fmt.Errorf("%s: code: %s, message: %s", errMsgPrefix, awsErr.Code(), awsErr.Message()) | ||
} | ||
|
||
return fmt.Errorf("%s: not an aws error", errMsgPrefix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just return errMsgPrefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Question: Why not handle this in other calls as well like DeleteBucket
, CreateBucket
, ...? They could also return malformed errors that would end up in the resource status.
97e626a
to
1905cce
Compare
1905cce
to
448a8c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rakeshgm Please handle these instances as well:
Line 579 in fe846a6
_, err := s.client.DeleteObject(&s3.DeleteObjectInput{ - We return the err back to higher layers, and should process it like in the other places
Line 627 in fe846a6
return s.batchDeleter.Delete(ctx, &s3manager.DeleteObjectsIterator{ - Here error is returned back to caller, would be good to process it right here and return instead
use aws/awserr package to report better errors with correct format Signed-off-by: rakeshgm <[email protected]>
Signed-off-by: rakeshgm <[email protected]>
use aws/awserr package to report
better errors with correct format
issue: #749
Bugzilla 2069759