Document reconnect behavior when onError is omitted
Co-authored-by: Eric Allam <eric@trigger.dev>
This commit is contained in:
@@ -651,6 +651,7 @@ the transport clears stored run state and future reconnect attempts return `null
|
||||
If stale inactive reconnect state cannot be cleaned up, reconnect still returns `null` and
|
||||
the failure is surfaced through `onError` with phase `reconnect`.
|
||||
Subsequent reconnect calls will retry stale inactive-state cleanup until it succeeds.
|
||||
If `onError` is omitted, reconnect still returns `null` and continues without callback reporting.
|
||||
|
||||
For richer TypeScript ergonomics in app code, `@trigger.dev/ai` also exports:
|
||||
|
||||
|
||||
@@ -151,6 +151,8 @@ both cleanup steps (`set` inactive state and `delete`) even if one of them fails
|
||||
- If reconnect finds stale inactive state and run-store cleanup fails, `onError` receives a
|
||||
`"reconnect"` phase event and reconnect still returns `null`.
|
||||
- If inactive-state cleanup fails, later reconnect calls retry that cleanup until it succeeds.
|
||||
- If `onError` is not provided, reconnect still returns `null` and continues operating
|
||||
without surfacing callback events.
|
||||
- Provide a custom `runStore` if you need state shared across processes/instances.
|
||||
|
||||
## `ai.tool(...)` example
|
||||
|
||||
Reference in New Issue
Block a user