# ContentSafetyViolationError

> **Class** in `langchain_azure_ai`

📖 [View in docs](https://reference.langchain.com/python/langchain-azure-ai/agents/middleware/content_safety/_base/ContentSafetyViolationError)

Raised when content safety violations with ``exit_behavior='error'``.

## Signature

```python
ContentSafetyViolationError(
    self,
    message: str,
    violations: Sequence[ContentSafetyEvaluation],
)
```

## Extends

- `ValueError`

## Constructors

```python
__init__(
    self,
    message: str,
    violations: Sequence[ContentSafetyEvaluation],
) -> None
```

| Name | Type |
|------|------|
| `message` | `str` |
| `violations` | `Sequence[ContentSafetyEvaluation]` |


## Properties

- `violations`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-azure/blob/7a6a664d617264df8dcb12fcfb1bacc09f21d504/libs/azure-ai/langchain_azure_ai/agents/middleware/content_safety/_base.py#L36)