We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 841471e commit 23c4e39Copy full SHA for 23c4e39
src/Console/Commands/DeleteIndex.php
@@ -6,6 +6,7 @@
6
use Laravel\Scout\EngineManager;
7
use Laravel\Scout\Engines\TypesenseEngine;
8
use RuntimeException;
9
+use Typesense\Exceptions\ObjectNotFound;
10
11
class DeleteIndex extends Command
12
{
@@ -47,7 +48,12 @@ public function handle(): int
47
48
throw new RuntimeException('Cannot delete collection ' . $collectionName . ' because it is currently targeted by an alias.');
49
}
50
- $collections[$collectionName]->delete();
51
+ try {
52
+ $collections[$collectionName]->delete();
53
+ $this->info("Collection {$collectionName} deleted");
54
+ } catch (ObjectNotFound) {
55
+ $this->line("No collection called {$collectionName} exists");
56
+ }
57
58
59
return Command::SUCCESS;
0 commit comments