Better error message for invalid bucket names
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
576d31d48d
commit
8b763ea0f7
|
@ -90,8 +90,8 @@ trait S3ConnectionTrait {
|
||||||
}
|
}
|
||||||
$this->connection = new S3Client($options);
|
$this->connection = new S3Client($options);
|
||||||
|
|
||||||
if (!S3Client::isBucketDnsCompatible($this->bucket)) {
|
if (!$this->connection->isBucketDnsCompatible($this->bucket)) {
|
||||||
throw new \Exception("The configured bucket name is invalid.");
|
throw new \Exception("The configured bucket name is invalid: " . $this->bucket);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->connection->doesBucketExist($this->bucket)) {
|
if (!$this->connection->doesBucketExist($this->bucket)) {
|
||||||
|
|
Loading…
Reference in New Issue