Update src/Client.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Jake Barnbyandcoderabbitai[bot] authored and GitHub committed 2025-08-04 21:34:23 +12:00
1 parent fba2c96b6e
commit 3fd9db4ec2
1 file changed
+3 -4
+3 -4
View File
@@ -118,10 +118,9 @@ class Client
if ($this->client->isConnected()) {
return $this;
}
if(!$this->client->connect($this->host, $this->port)){
throw new \Exception("Failed to connect to MongoDB");
}
if (!$this->client->connect($this->host, $this->port)) {
throw new Exception("Failed to connect to MongoDB at {$this->host}:{$this->port}");
}
[$payload, $db] = $this->auth->start();