File tree Expand file tree Collapse file tree
src/room/data-stream/incoming Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
2- " livekit-client " : patch
2+ ' livekit-client ' : patch
33---
44
55Use controller.error to signal unexpected errors mid data stream
Original file line number Diff line number Diff line change @@ -284,6 +284,7 @@ const appActions = {
284284 ) ;
285285 }
286286 } catch ( err ) {
287+ console . error ( 'text stream error' , err ) ;
287288 message += 'ERROR' ;
288289 handleChatMessage (
289290 {
@@ -293,7 +294,6 @@ const appActions = {
293294 } ,
294295 room . getParticipantByIdentity ( participant ?. identity ) ,
295296 ) ;
296- throw err ;
297297 }
298298
299299 if ( ! info . size ) {
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ export class ByteStreamReader extends BaseStreamReader<ByteStreamInfo> {
7171
7272 [ Symbol . asyncIterator ] ( ) {
7373 const reader = this . reader . getReader ( ) ;
74+ // Suppress unhandled rejection on reader.closed — errors are
75+ // already propagated through reader.read() to the consumer.
76+ reader . closed . catch ( ( ) => { } ) ;
7477
7578 const cleanup = ( ) => {
7679 reader . releaseLock ( ) ;
@@ -195,6 +198,9 @@ export class TextStreamReader extends BaseStreamReader<TextStreamInfo> {
195198 */
196199 [ Symbol . asyncIterator ] ( ) {
197200 const reader = this . reader . getReader ( ) ;
201+ // Suppress unhandled rejection on reader.closed — errors are
202+ // already propagated through reader.read() to the consumer.
203+ reader . closed . catch ( ( ) => { } ) ;
198204 const decoder = new TextDecoder ( 'utf-8' , { fatal : true } ) ;
199205 const signal = this . signal ;
200206
You can’t perform that action at this time.
0 commit comments