File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -521,6 +521,8 @@ export const createHttpInvoker = <
521521 fetcher ( url , {
522522 credentials : actorsServer ?. credentials ,
523523 method : "POST" ,
524+ // @ts -expect-error: its ok because deno fetch does not have this but browsers does
525+ duplex : "half" as const , // Add this line for browser compatibility
524526 headers : {
525527 "Content-Type" : "application/octet-stream" ,
526528 "Transfer-Encoding" : "chunked" ,
@@ -530,6 +532,10 @@ export const createHttpInvoker = <
530532 : { } ,
531533 } ,
532534 body : requestReadable ,
535+ } ) . catch ( ( err ) => {
536+ recvChan . close ( err ) ;
537+ sendChan . close ( err ) ;
538+ throw err ;
533539 } ) . then ( async ( response ) => {
534540 if ( ! response . ok ) {
535541 throw new Error ( `HTTP error! status: ${ response . status } ` ) ;
You can’t perform that action at this time.
0 commit comments