Open History to see the last commit
1---
2id: RunErrorEvent
3title: RunErrorEvent
4---
5
6# Interface: RunErrorEvent
7
8Defined in: [packages/ai/src/types.ts:1124](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1124)
9
10Emitted when an error occurs during a run.
11
12@ag-ui/core provides: `message`, `code?`
13TanStack AI adds: `model?`, `error?` (deprecated nested form)
14
15## Extends
16
17- `RunErrorEvent`
18
19## Indexable
20
21```ts
22[k: string]: unknown
23```
24
25## Properties
26
27### ~~error?~~
28
29```ts
30optional error: object;
31```
32
33Defined in: [packages/ai/src/types.ts:1131](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1131)
34
35#### ~~code?~~
36
37```ts
38optional code: string;
39```
40
41#### ~~message~~
42
43```ts
44message: string;
45```
46
47#### Deprecated
48
49Use top-level `message` and `code` fields instead.
50Kept for backward compatibility.
51
52***
53
54### model?
55
56```ts
57optional model: string;
58```
59
60Defined in: [packages/ai/src/types.ts:1126](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1126)
61
62Model identifier for multi-model support