fix(httpapi): expose v2 catalog errors (#28498)

This commit is contained in:
Shoubhit Dash
2026-05-21 00:53:35 +05:30
committed by GitHub
parent 7690481fc1
commit 4308dd75fb
8 changed files with 82 additions and 14 deletions

View File

@@ -62,6 +62,8 @@ type Trace = {
write(type: string, data?: unknown): void
}
const StreamClosed = undefined as never
type StreamInput = {
sdk: OpencodeClient
directory?: string
@@ -418,12 +420,12 @@ function createLayer(input: StreamInput) {
),
(events) =>
Effect.sync(() => {
void events.stream.return(undefined).catch(() => {})
void events.stream.return(StreamClosed).catch(() => {})
}),
),
)
closeStream = () => {
void events.stream.return(undefined).catch(() => {})
void events.stream.return(StreamClosed).catch(() => {})
}
input.trace?.write("recv.subscribe", {
sessionID: input.sessionID,