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

NAS-131365 / 25.04 / Better error message for bad storj bucket name #14564

Closed
wants to merge 2 commits into from

Conversation

creatorcary
Copy link
Contributor

Currently the returned error message is "An error occurred (InvalidBucketName) when calling the CreateBucket operation: The specified bucket is not valid." To save the user some research, we can clarify this message to "Bucket name can only contain lowercase letters, numbers, and hyphens" which is verbatim in the storj documentation.

bad_bucket_name_alert

@creatorcary creatorcary requested a review from a team September 23, 2024 16:06
@bugclerk bugclerk changed the title Better error message for bad storj bucket name NAS-131365 / 25.04 / Better error message for bad storj bucket name Sep 23, 2024
@bugclerk
Copy link
Contributor

@william-gr
Copy link
Member

Should we improve validation error too? IIRC it accepts uppercase there now
I dont know if Storj issue is starting with uppercase or any uppercase

@creatorcary
Copy link
Contributor Author

creatorcary commented Sep 23, 2024

IIRC it accepts uppercase there now I dont know if Storj issue is starting with uppercase or any uppercase

I tested on a vm and it doesn't accept any caps. Here's the exact restrictions on bucket names that I found.

@creatorcary
Copy link
Contributor Author

IMHO I don't know about hard-coding the business logic of a third party like this. It might be better to leave the current error message and only change the webui validation.

@william-gr
Copy link
Member

william-gr commented Sep 23, 2024

Well, if there are clear restrictions on bucket names, we dont we validate it just like we do anything else, like dataset/pool names?

Right now all we have is: Str("bucket", required=True, empty=False) ?

Copy link
Contributor

@themylogin themylogin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the current approach (only rewording the message).

However, what if the bucket already exists? Did you test that it would not be an InvalidName error?

@yocalebo
Copy link
Contributor

I spoke directly with Logan and we can actually make this a bit more proper, going to close this and he'll push another PR.

@yocalebo yocalebo closed this Sep 23, 2024
@yocalebo yocalebo deleted the NAS-131365 branch September 23, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants