Skip to content

Commit

Permalink
Better error message for invalid bucket names
Browse files Browse the repository at this point in the history
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
  • Loading branch information
MorrisJobke committed Nov 6, 2017
1 parent 576d31d commit 8b763ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Files/ObjectStore/S3ConnectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ protected function getConnection() {
}
$this->connection = new S3Client($options);

if (!S3Client::isBucketDnsCompatible($this->bucket)) {
throw new \Exception("The configured bucket name is invalid.");
if (!$this->connection->isBucketDnsCompatible($this->bucket)) {
throw new \Exception("The configured bucket name is invalid: " . $this->bucket);
}

if (!$this->connection->doesBucketExist($this->bucket)) {
Expand Down

0 comments on commit 8b763ea

Please sign in to comment.