Skip to content

Comments

Improve error message for invalid bucket name length in storage create#4729

Closed
kubosuke wants to merge 1 commit intosuperfly:masterfrom
kubosuke:fix/storage-name-length-error-handling
Closed

Improve error message for invalid bucket name length in storage create#4729
kubosuke wants to merge 1 commit intosuperfly:masterfrom
kubosuke:fix/storage-name-length-error-handling

Conversation

@kubosuke
Copy link

Change Summary

What and Why:
When creating a storage bucket with an invalid name length, the API returns a generic error: The specified bucket is not valid. This makes it hard for users to understand the issue.

How:
Added client-side validation to check bucket name length (3-63 characters) before calling the API, with a clear error message and link to docs.

Error: bucket name "..." is too long: must be at most 63 characters, got 64. 
See https://www.tigrisdata.com/docs/buckets/bucket-rules/

Related to:
N/A


Documentation

  • Fresh Produce
  • In superfly/docs, or asked for help from docs team
  • n/a

When a bucket name exceeds 63 characters (or is less than 3), the API
returns a generic error message 'The specified bucket is not valid'.

This change adds client-side validation to provide a clear error message
that explains the length constraint and includes a link to the Tigris
bucket naming rules documentation.

Example error:
  bucket name "..." is too long: must be at most 63 characters, got 64.
  See https://www.tigrisdata.com/docs/buckets/bucket-rules/
}

func runCreate(ctx context.Context) (err error) {
bucketName := flag.GetString(ctx, "name")
Copy link
Member

Choose a reason for hiding this comment

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

this is fun stuff because I can't find where the bucket name is passed to Tigris extension. It is like the --name cli flag is completely ignored

@kubosuke kubosuke closed this Feb 24, 2026
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.

2 participants