---
title: "Exceptions"
manual: "TYPO3 LLM Extension"
version: "0.35"
permalink: "https://docs.typo3.org/permalink/netresearch/nr-llm:api-exceptions@0.35"
source: "Api/Exceptions.rst"
modified: "2026-09-16T22:09:16+00:00"
---

# Exceptions

-   **interface NrLlmExceptionInterface**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Exception\NrLlmExceptionInterface`

    Marker interface implemented by every exception this extension
    throws on its public API surface — including the `fromArray()`
    normalisation errors of `ChatMessage` / `ToolSpec` /
    `ToolCall`. Catch this when any nr_llm failure should take the
    same error path ([ADR-053](https://docs.typo3.org/permalink/netresearch/nr-llm:adr-053@0.35)):

    ```
    try {
        $response = $this->llmManager->chatWithTools($messages, $tools);
    } catch (NrLlmExceptionInterface $e) {
        throw new MyDomainException($e->getMessage(), 0, $e);
    }
    ```

-   **class ProviderException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Provider\Exception\ProviderException`

    Base exception for provider errors.

    -   **getProvider() : string**

        Get the provider that threw the exception.

-   **class ProviderConfigurationException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Provider\Exception\ProviderConfigurationException`

    Thrown when a provider is incorrectly
    configured.

    Extends
    [\\Netresearch\\NrLlm\\Provider\\Exception\\ProviderException](https://docs.typo3.org/permalink/netresearch/nr-llm:netresearch-nrllm-provider-exception-providerexception@0.35)

-   **class ProviderConnectionException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Provider\Exception\ProviderConnectionException`

    Thrown when a connection to the provider
    fails.

    Extends
    [\\Netresearch\\NrLlm\\Provider\\Exception\\ProviderException](https://docs.typo3.org/permalink/netresearch/nr-llm:netresearch-nrllm-provider-exception-providerexception@0.35)

-   **class ProviderResponseException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Provider\Exception\ProviderResponseException`

    Thrown when the provider returns an
    unexpected or error response.

    Extends
    [\\Netresearch\\NrLlm\\Provider\\Exception\\ProviderException](https://docs.typo3.org/permalink/netresearch/nr-llm:netresearch-nrllm-provider-exception-providerexception@0.35)

-   **class UnsupportedFeatureException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Provider\Exception\UnsupportedFeatureException`

    Thrown when a requested feature is not
    supported by the provider.

    Extends
    [\\Netresearch\\NrLlm\\Provider\\Exception\\ProviderException](https://docs.typo3.org/permalink/netresearch/nr-llm:netresearch-nrllm-provider-exception-providerexception@0.35)

-   **class InvalidArgumentException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Exception\InvalidArgumentException`

    Thrown for invalid method arguments.

-   **class ConfigurationNotFoundException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Exception\ConfigurationNotFoundException`

    Thrown when a named configuration is not found.

-   **class ConfigurationInactiveException**

    -   *Fully qualified name:* `\Netresearch\NrLlm\Exception\ConfigurationInactiveException`

    Thrown when a named configuration exists but is
    deactivated ([ADR-070](https://docs.typo3.org/permalink/netresearch/nr-llm:adr-070@0.35)).

    Only `ConfigurationResolver::getActiveByIdentifier()` differentiates
    inactive from not-found; the user-aware
    `LlmConfigurationServiceInterface::getConfiguration()` signals the
    inactive case as `ConfigurationNotFoundException` (code `2690936773`).

## Events

> [!NOTE]
> PSR-14 events (`BeforeRequestEvent`, `AfterResponseEvent`) are planned
> for a future release. The event classes do not exist yet in the current
> codebase.
