Skip to content

Fix: define duplex option on non-null body on infra open-api client fetch#81

Merged
mishushakov merged 1 commit into
mainfrom
fix-duplex-option-is-required-when-sending-a-body-e2b-2547
Jun 24, 2025
Merged

Fix: define duplex option on non-null body on infra open-api client fetch#81
mishushakov merged 1 commit into
mainfrom
fix-duplex-option-is-required-when-sending-a-body-e2b-2547

Conversation

@ben-fornefeld
Copy link
Copy Markdown
Member

@ben-fornefeld ben-fornefeld commented Jun 24, 2025

Since we replace the infra openapi clients fetch function with next.js native fetch, and the open-api client always passes bodies as ReadableStream, we have to set duplex: "half" on the overridden fetch client when body is defined.

Fixes #80

@ben-fornefeld ben-fornefeld self-assigned this Jun 24, 2025
@ben-fornefeld ben-fornefeld added the bug Something isn't working label Jun 24, 2025
@linear
Copy link
Copy Markdown

linear Bot commented Jun 24, 2025

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 1:36pm
web-juliett 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 1:36pm

@ben-fornefeld ben-fornefeld marked this pull request as ready for review June 24, 2025 13:36
@mishushakov mishushakov merged commit 3c1f1cf into main Jun 24, 2025
2 of 4 checks passed
@mishushakov mishushakov deleted the fix-duplex-option-is-required-when-sending-a-body-e2b-2547 branch June 24, 2025 13:37
kitchenbeats pushed a commit to kitchenbeats/botlink-dashboard that referenced this pull request Oct 20, 2025
…etch (e2b-dev#81)

Since we replace the infra openapi clients fetch function with next.js
native fetch, and the open-api client always passes bodies as
`ReadableStream`, we have to set `duplex: "half"` on the overridden
fetch client when body is defined.

Fixes e2b-dev#80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Help! RequestInit: duplex option is required when sending a body.

2 participants