diff --git a/server/platform/shared/filestore/s3store.go b/server/platform/shared/filestore/s3store.go index d2f71823c7..ba496dd5f4 100644 --- a/server/platform/shared/filestore/s3store.go +++ b/server/platform/shared/filestore/s3store.go @@ -7,6 +7,7 @@ import ( "bytes" "context" "crypto/tls" + "fmt" "io" "io/fs" "net/http" @@ -215,7 +216,7 @@ func (b *S3FileBackend) TestConnection() error { if obj.Err != nil { typedErr := s3.ToErrorResponse(obj.Err) if typedErr.Code != bucketNotFound && typedErr.Code != invalidBucket { - return &S3FileBackendAuthError{DetailedError: "unable to list objects in the S3 bucket"} + return &S3FileBackendAuthError{DetailedError: fmt.Sprintf("unable to list objects in the S3 bucket: %v", typedErr)} } exists = false } @@ -224,7 +225,7 @@ func (b *S3FileBackend) TestConnection() error { if err != nil { typedErr := s3.ToErrorResponse(err) if typedErr.Code != bucketNotFound && typedErr.Code != invalidBucket { - return &S3FileBackendAuthError{DetailedError: "unable to check if the S3 bucket exists"} + return &S3FileBackendAuthError{DetailedError: fmt.Sprintf("unable to check if the S3 bucket exists: %v", typedErr)} } } }