Skip to content

Commit

Permalink
bucketExists: return consistent NotFound error code
Browse files Browse the repository at this point in the history
bucketExists() returns NoSucketBucket or NotFound error code depending
if region is specified in Minio Client initialization. This PR always
specifies us-east-1 region in HEAD bucket call to avoid the internal
code fetching for bucket location and returning NoSuchBucket error code.
  • Loading branch information
vadmeste committed Jan 29, 2018
1 parent bb5c105 commit 06ecfb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/minio.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ export class Client {
throw new TypeError('callback should be of type "function"')
}
var method = 'HEAD'
this.makeRequest({method, bucketName}, '', 200, '', false, cb)
this.makeRequest({method, bucketName}, '', 200, 'us-east-1', false, cb)
}

// Remove a bucket.
Expand Down

0 comments on commit 06ecfb7

Please sign in to comment.