---
jsApi: true
title: "[F] $error"

---
```ts
$error(context, entity): void
```

`@error` decorator marks a model as an error type.

`@error` can only be specified on a model.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `context` | [`DecoratorContext`](Interface.DecoratorContext.md) |
| `entity` | [`Model`](Interface.Model.md) |

## Returns

`void`
