Skip to content

listObjects should return NoSuchBucket when the bucket doesn't exist and prefix is passed #32

@cbornet

Description

@cbornet

Expected Behavior

listObjects should return NoSuchBucket error when there is a prefix.

Current Behavior

listObjects doesn't return NoSuchBucket error when there is a prefix with Minio.
S3 does return NoSuchBucket.

Steps to Reproduce (for bugs)

Run this script with the bucket not existing:

s3 = boto3.client(
    "s3",
    endpoint_url="http://localhost:9000",
    aws_access_key_id="minioadmin",
    aws_secret_access_key="minioadmin",
)
s3.list_objects(Bucket="your-unique-bucket-name-2039750257078", Prefix="/")

It doesn't raise NoSuchBucket exception (the result is an empty list)

If you run on S3, it raises NoSuchBucket exception.

Regression

Yes. It was working on RELEASE.2024-01-29T03-56-32Z.
It started not working from RELEASE.2024-01-31T20-20-33Z

Your Environment

  • Version used (minio --version): RELEASE.2026-04-17T00-00-00Z (go1.26.2 linux/arm64)
  • Server setup and configuration:
  • Operating System and version (uname -a):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions