Compare commits

..

No commits in common. "brendan/sdk-html-content-type" and "dev" have entirely different histories.

1 changed files with 2 additions and 8 deletions

View File

@ -77,12 +77,6 @@ export function createOpencodeClient(config?: Config & { directory?: string; exp
workspace: config?.experimental_workspaceID,
}),
)
client.interceptors.response.use((response) => {
const contentType = response.headers.get("content-type")
if (contentType === "text/html")
throw new Error("Request is not supported by this version of OpenCode Server (Server responded with text/html)")
return response
})
return new OpencodeClient({ client })
const result = new OpencodeClient({ client })
return result
}