> ## Documentation Index
> Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ErrorContent

> Error content type for LLM safety and content filtering errors.

# ErrorContent

Error content type for LLM safety and content filtering errors.

## Import

```typescript theme={null}
import type { ErrorContent } from '@adaline/api';
```

## Type Definition

```typescript theme={null}
interface ErrorContent {
  modality: 'error';
  value: SafetyErrorContentValue;
}

interface SafetyErrorContentValue {
  type: 'safety';
  value: string;
}
```

## Fields

<ParamField body="modality" type="string" required>
  Must be `"error"`.
</ParamField>

<ParamField body="value" type="SafetyErrorContentValue" required>
  Safety error value with `type` (always `"safety"`) and a `value` string describing the error.
</ParamField>

***

## Example

```typescript theme={null}
import type { ErrorContent } from '@adaline/api';

const error: ErrorContent = {
  modality: 'error',
  value: {
    type: 'safety',
    value: 'Content filtered due to safety policy.'
  }
};
```

**JSON**:

```json theme={null}
{
  "modality": "error",
  "value": {
    "type": "safety",
    "value": "Content filtered due to safety policy."
  }
}
```

***

## Related

* [MessageContent](/docs/reference/sdk/v2/typescript/types/MessageContent) — union type that includes `ErrorContent`
* [PromptMessage](/docs/reference/sdk/v2/typescript/types/PromptMessage) — uses `MessageContent[]` as its `content` field
