Open History to see the last commit
1---
2id: ErrorInfo
3title: ErrorInfo
4---
5
6# Interface: ErrorInfo
7
8Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:310](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L310)
9
10Information passed to onError.
11
12## Properties
13
14### duration
15
16```ts
17duration: number;
18```
19
20Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:314](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L314)
21
22Duration until error in milliseconds
23
24***
25
26### error
27
28```ts
29error: unknown;
30```
31
32Defined in: [packages/typescript/ai/src/activities/chat/middleware/types.ts:312](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/middleware/types.ts#L312)
33
34The error that caused the failure