Better error message for invalid bucket names

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-11-06 09:48:41 +01:00
parent 576d31d48d
commit 8b763ea0f7
No known key found for this signature in database
GPG key ID: FE03C3A163FEDE68

View file

@ -90,8 +90,8 @@ trait S3ConnectionTrait {
}
$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)) {