Do not use a chain for S3 tiering to return better error messages (#18030)

When using a chain provider all providers do not return a valid
access and secret key, an anonymous request is sent, which makes it hard
for users to figure out what is going on

In the case of S3 tiering, when AWS IAM temporary account generation returns
an error, an anonymous login will be used because of the chain provider.
Avoid this and use the AWS IAM provider directly to get a good error
message.
This commit is contained in:
Anis Eleuch
2023-09-14 15:28:20 -07:00
committed by GitHub
parent 7a7068ee47
commit b0e1776d6d
3 changed files with 7 additions and 16 deletions

View File

@@ -117,7 +117,7 @@ type tierPermErr struct {
}
func (te tierPermErr) Error() string {
return fmt.Sprintf("failed to perform %s %v", te.Op, te.Err)
return fmt.Sprintf("failed to perform %s: %v", te.Op, te.Err)
}
func errIsTierPermError(err error) bool {