diff --git a/packages/core/src/Router.ts b/packages/core/src/Router.ts index 24e6d8d6..e6f36165 100644 --- a/packages/core/src/Router.ts +++ b/packages/core/src/Router.ts @@ -166,7 +166,11 @@ export default class Router { const requestBody = request?.body || options?.body; if (requestBody instanceof ReadableStream) { - requestBody.cancel(error); + if (requestBody.locked) { + requestBody.getReader().cancel(error); + } else { + requestBody.cancel(error); + } } if (callLog?.response?.body) {