mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
Translate gcs errors to S3 compatible errors, fixes #4278
This commit is contained in:
parent
909a89647b
commit
07949f68d8
@ -101,6 +101,11 @@ func gcsToObjectError(err error, params ...string) error {
|
||||
message := googleAPIErr.Errors[0].Message
|
||||
|
||||
switch reason {
|
||||
case "required":
|
||||
// Anonymous users does not have storage.xyz access to project 123.
|
||||
fallthrough
|
||||
case "keyInvalid":
|
||||
fallthrough
|
||||
case "forbidden":
|
||||
err = PrefixAccessDenied{
|
||||
Bucket: bucket,
|
||||
@ -237,7 +242,7 @@ func (l *gcsGateway) ListBuckets() ([]BucketInfo, error) {
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return []BucketInfo{}, err
|
||||
return []BucketInfo{}, gcsToObjectError(traceError(err))
|
||||
}
|
||||
|
||||
b = append(b, BucketInfo{
|
||||
|
Loading…
x
Reference in New Issue
Block a user