summaryrefslogtreecommitdiff
path: root/api-stat.go
diff options
context:
space:
mode:
Diffstat (limited to 'api-stat.go')
-rw-r--r--api-stat.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/api-stat.go b/api-stat.go
index 3b054c3..91e9d39 100644
--- a/api-stat.go
+++ b/api-stat.go
@@ -47,6 +47,10 @@ func (c Client) BucketExists(bucketName string) (bool, error) {
return false, err
}
if resp != nil {
+ resperr := httpRespToErrorResponse(resp, bucketName, "")
+ if ToErrorResponse(resperr).Code == "NoSuchBucket" {
+ return false, nil
+ }
if resp.StatusCode != http.StatusOK {
return false, httpRespToErrorResponse(resp, bucketName, "")
}