Skip to content
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

Rethrow exceptions other than InvalidBucketNameError #1338

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

iyxan23
Copy link
Contributor

@iyxan23 iyxan23 commented Aug 29, 2024

I had an issue where this minio client throws a InvalidArgumentError: Unable to get bucket region for ... error when trying to retrieve a presigned url. I was so confused as to why would I need to configure bucket regions for minio because I'm running it locally on as a docker container.

I modified the source to console.error the error and it appears like the original error was actually an ECONNREFUSED, masked behind the incorrect InvalidArgumentError because of the large try-catch statement.

In this PR, I made it so that it would only throw InvalidArgumentError only when the originating error is an InvalidBucketNameError, and rethrow any other error.

@prakashsvmx prakashsvmx merged commit e556d26 into minio:master Sep 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants