File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
packages/core/src/browser Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -151,10 +151,15 @@ async function afterSend(
151151 if ( responseBodyCondition !== ResponseBodyAction . IGNORE ) {
152152 const clonedResponse = tryToClone ( response )
153153 if ( clonedResponse && clonedResponse . body ) {
154- const bytes = await readBytesFromStream ( clonedResponse . body , {
155- collectStreamBody : responseBodyCondition === ResponseBodyAction . COLLECT ,
156- } )
157- context . responseBody = bytes && new TextDecoder ( ) . decode ( bytes )
154+ try {
155+ const bytes = await readBytesFromStream ( clonedResponse . body , {
156+ collectStreamBody : responseBodyCondition === ResponseBodyAction . COLLECT ,
157+ } )
158+ context . responseBody = bytes && new TextDecoder ( ) . decode ( bytes )
159+ } catch {
160+ // Ignore errors when reading the response body (e.g., stream aborted, network errors)
161+ // This is not critical and should not be reported as an SDK error
162+ }
158163 }
159164 }
160165
You can’t perform that action at this time.
0 commit comments