Skip to content

Commit 6c73f9d

Browse files
GromNaNCopilot
andcommitted
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7968831 commit 6c73f9d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Exception/SearchNotSupportedException.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ final class SearchNotSupportedException extends ServerException
1010
/** @internal */
1111
public static function create(ServerException $e): self
1212
{
13-
$message = $e->getCode() === 31082 ? $e->getMessage() : 'Using Atlas Search Database Commands and the $listSearchIndexes aggregation stage requires additional configuration. Please connect to Atlas or an AtlasCLI local deployment to enable. For more information on how to connect, see https://dochub.mongodb.org/core/atlas-cli-deploy-local-reqs';
13+
$message = $e->getCode() === 31082
14+
? $e->getMessage()
15+
: 'Using Atlas Search Database Commands and the $listSearchIndexes aggregation stage requires additional configuration. '
16+
. 'Please connect to Atlas or an AtlasCLI local deployment to enable. '
17+
. 'For more information on how to connect, see https://dochub.mongodb.org/core/atlas-cli-deploy-local-reqs';
1418

1519
return new self($message, $e->getCode(), $e);
1620
}

tests/Exception/SearchNotSupportedExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Exception;
3+
namespace MongoDB\Tests\Exception;
44

55
use MongoDB\Driver\Command;
66
use MongoDB\Driver\Exception\ServerException;

0 commit comments

Comments
 (0)