diff --git a/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js b/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js index 0000000..0000000 100644 --- a/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js +++ b/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js @@ -26,7 +26,13 @@ let buffer = ""; const abortHandler = () => { try { - void reader.cancel(); + // reader.cancel() returns a promise that can reject (e.g. it races + // with fetch's own abort teardown of the same stream). Swallow that + // rejection explicitly — otherwise it surfaces as an unhandled + // promise rejection in the host process. + void reader.cancel().catch(() => { + // noop + }); } catch { // noop diff --git a/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js b/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js index 0000000..0000000 100644 --- a/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js +++ b/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js @@ -40,7 +40,13 @@ let buffer = ""; const abortHandler = () => { try { - reader.cancel(); + // reader.cancel() returns a promise that can reject (e.g. it races + // with fetch's own abort teardown of the same stream). Swallow that + // rejection explicitly — otherwise it surfaces as an unhandled + // promise rejection in the host process. + void reader.cancel().catch(() => { + // noop + }); } catch { // noop