Skip to content

Commit bd8a0a9

Browse files
ozppupbgclaude
andcommitted
Re-raise interrupt-only causes so a shutting-down subscription fiber still unwinds; only a genuine touch failure is swallowed.
Co-authored-by: Claude Opus 4.8 <[email protected]>
1 parent 9e5c444 commit bd8a0a9

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎apps/server/src/provider/Layers/ProviderService.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
type ProviderSession,
2626
} from "@t3tools/contracts";
2727
import { causeErrorTag } from "@t3tools/shared/observability";
28+
import * as Cause from "effect/Cause";
2829
import * as DateTime from "effect/DateTime";
2930
import * as Effect from "effect/Effect";
3031
import * as Layer from "effect/Layer";
@@ -295,11 +296,13 @@ const makeProviderService = Effect.fn("makeProviderService")(function* (
295296
? Effect.void
296297
: directory.touch(event.threadId).pipe(
297298
Effect.catchCause((cause) =>
298-
Effect.logDebug("provider.session.activity.touch-failed", {
299-
threadId: event.threadId,
300-
eventType: event.type,
301-
cause,
302-
}),
299+
Cause.hasInterruptsOnly(cause)
300+
? Effect.interrupt
301+
: Effect.logDebug("provider.session.activity.touch-failed", {
302+
threadId: event.threadId,
303+
eventType: event.type,
304+
cause,
305+
}),
303306
),
304307
);
305308

0 commit comments

Comments
 (0)