Document dual-step best-effort run-store cleanup behavior
Co-authored-by: Eric Allam <eric@trigger.dev>
This commit is contained in:
@@ -623,7 +623,8 @@ optional `runId`, and the underlying `error` (non-Error throws are normalized to
|
||||
instances).
|
||||
|
||||
Run-store cleanup is handled as best effort, and cleanup failures won't mask the original
|
||||
transport failure that triggered `onError`.
|
||||
transport failure that triggered `onError`. Cleanup still attempts both persistence steps
|
||||
(`set` inactive state and `delete`) even when one step fails.
|
||||
|
||||
```ts
|
||||
import type { TriggerChatRunState, TriggerChatRunStore } from "@trigger.dev/ai";
|
||||
|
||||
@@ -16,3 +16,4 @@
|
||||
- Added phase-aware `onError` reporting across send, stream-subscribe, reconnect, and stream-consumption paths.
|
||||
- Added normalization of non-Error throw values into Error instances before `onError` reporting.
|
||||
- Added best-effort run-store cleanup so cleanup failures do not mask root transport errors.
|
||||
- Improved best-effort run-store cleanup to attempt both inactive-state writes and deletes even if one step fails.
|
||||
|
||||
@@ -141,7 +141,8 @@ The callback receives:
|
||||
- `error`
|
||||
|
||||
Cleanup operations against custom `runStore` implementations are best-effort. If store cleanup
|
||||
fails, the original transport error is still preserved and surfaced.
|
||||
fails, the original transport error is still preserved and surfaced. The transport also attempts
|
||||
both cleanup steps (`set` inactive state and `delete`) even if one of them fails.
|
||||
|
||||
## Reconnect semantics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user