From a277fb4049f566c7269163ff988fd9aa6dce4a3b Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Thu, 19 Mar 2026 16:23:07 -0400 Subject: [PATCH] log errors in catchCause instead of silently swallowing --- packages/opencode/src/command/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/command/index.ts b/packages/opencode/src/command/index.ts index 65c0925d72..2f2f73f51b 100644 --- a/packages/opencode/src/command/index.ts +++ b/packages/opencode/src/command/index.ts @@ -12,6 +12,7 @@ import { Skill } from "../skill" import { Log } from "../util/log" export namespace Command { +<<<<<<< HEAD const log = Log.create({ service: "command" }) type State = { @@ -19,6 +20,10 @@ export namespace Command { ensure: () => Promise } +||||||| parent of b53a95fd8 (log errors in catchCause instead of silently swallowing) +======= + const log = Log.create({ service: "command" }) +>>>>>>> b53a95fd8 (log errors in catchCause instead of silently swallowing) export const Event = { Executed: BusEvent.define( "command.executed", @@ -318,7 +323,7 @@ export namespace Command { >>>>>>> 8e11a46fe (use forkScoped + Fiber.join for lazy init (match old Instance.state behavior)) const loadFiber = yield* load().pipe( - Effect.catchCause(() => Effect.void), + Effect.catchCause((cause) => Effect.sync(() => log.error("init failed", { cause }))), Effect.forkScoped, )