minio-js
minio-js copied to clipboard
The behaviour differs from mc client
In on-prem scenario, we meed some problems, the case is that If the api GetBucketLocation be limited, minio-js cannot work, but mc can work
https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html
the root cause is that different reponse handler for mc and minio-js, for minio-js, if the api GetBucketLocation 403, the sdk will throw error:
https://github.com/minio/minio-js/blob/c8154001210ee92663afe95fcc26b1083f632b9a/src/internal/client.ts#L751-L806
for mc client, if the api GetBucketLocation 403, and the region in reponse is empty, it will return the default location us-east-1
https://github.com/minio/minio-go/blob/21381fc6dd612fd7f1f03b1e5d5fddef4b6eae52/bucket-cache.go#L120-L172
so I want that the minio-js sdk can have consist behaviour as mc client which use minio-go sdk underlay.