PluginException from getSearchVectorInput() is not caught, returning empty results with no error
## Problem
When the configured embeddings engine plugin cannot be instantiated, `getSearchVectorInput()` throws a `PluginException`. Nothing catches it in the search path. The search returns empty results with no error logged and no message shown to the user or admin.
There is no way to tell from the outside whether the search ran and found nothing, or crashed before running at all.
Common triggers:
- The AI provider module is disabled or uninstalled
- `embeddings_engine` in config references a provider ID that no longer exists
- The provider is not fully configured
## Steps to reproduce
1. Install `ai_search`.
2. Configure a Search API index with the AI Search backend and set an embeddings engine.
3. Disable or uninstall the AI provider module that backs the configured embeddings engine. Alternatively set `embeddings_engine` in config to a provider ID that does not exist.
4. Run a search query.
5. Observe: empty results, no error logged, no watchdog entry, no admin message.
## Proposed resolution
Wrap the `getSearchVectorInput()` call in a `try/catch` for `PluginException`. For providers that do not use embeddings, an empty `$vector_input` is intentional and the query should continue. For providers that require embeddings, log the exception before returning empty results.
```php
try {
$vector_input = $this->getSearchVectorInput($query, $params);
}
catch (PluginException $e) {
// Providers that skip embeddings (e.g. LLM-reasoning-based providers)
// reach here when no embeddings engine is configured.
// Treat as intentional and let the downstream check decide the path.
$vector_input = [];
}
```
## Notes
This primarily affects embedding-free providers, but it can also affect vector providers if the embeddings engine config becomes stale after a module change or is incomplete. Embedding-free providers hit it on every query because they never configure an embeddings engine, which is why it was easy to catch here.
Found while building [ai_pageindex](https://www.drupal.org/project/ai_pageindex), a VDB provider that uses LLM reasoning instead of embeddings. Because it has no embeddings engine configured, this exception fired on every query. I did a quick search of the issue queue and did not find an identical report. If this is a duplicate, please share the link and close this one.
issue