Skip to content

BucketExistsAsync does not handle exception properly #945

@nwrox

Description

@nwrox

When testing a client configured with a fake endpoint, the method BucketExistsAsync still returns true, because there's not a check for other status codes or the exception isn't thrown here:

catch (InternalClientException ice)
{
if ((ice.ServerResponse is not null &&
HttpStatusCode.NotFound.Equals(ice.ServerResponse.StatusCode)) ||
ice.ServerResponse is null)
return false;
}

Is this correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions