Skip to content

Commit

Permalink
minio#1118 throw exceptions returned from BucketExistsAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
james-llo committed Jul 1, 2024
1 parent 2e46392 commit 1729619
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Minio/ApiEndpoints/BucketOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ public async Task<bool> BucketExistsAsync(BucketExistsArgs args, CancellationTok
using var response =
await this.ExecuteTaskAsync(ResponseErrorHandlers, requestMessageBuilder,
cancellationToken: cancellationToken).ConfigureAwait(false);
return response is not null &&
(response.Exception is null ||
response.Exception.GetType() != typeof(BucketNotFoundException));

return response?.Exception != null ? throw response.Exception : response is not null;
}
catch (InternalClientException ice)
{
Expand Down

0 comments on commit 1729619

Please sign in to comment.