@@ -144,6 +144,7 @@ export class SocketSdk {
144144 return
145145 }
146146 // Validate response before processing.
147+ /* c8 ignore next 3 - Defensive check, response should always be defined after successful request */
147148 if ( ! res ) {
148149 throw new Error ( 'Failed to get response from batch PURL request' )
149150 }
@@ -388,6 +389,7 @@ export class SocketSdk {
388389 return await this . #handleApiError< 'batchPackageFetch' > ( e )
389390 }
390391 // Validate response before processing.
392+ /* c8 ignore next 3 - Defensive check, response should always be defined after successful request */
391393 if ( ! res ) {
392394 throw new Error ( 'Failed to get response from batch PURL request' )
393395 }
@@ -1788,6 +1790,7 @@ export class SocketSdk {
17881790 // Stream to file with error handling.
17891791 const writeStream = createWriteStream ( output )
17901792 res . pipe ( writeStream )
1793+ /* c8 ignore next 4 - Write stream error handler, difficult to test reliably */
17911794 writeStream . on ( 'error' , error => {
17921795 throw new Error ( `Failed to write to file: ${ output } ` , {
17931796 cause : error ,
@@ -1796,6 +1799,7 @@ export class SocketSdk {
17961799 } else if ( output === true ) {
17971800 // Stream to stdout with error handling.
17981801 res . pipe ( process . stdout )
1802+ /* c8 ignore next 3 - Stdout error handler, difficult to test reliably */
17991803 process . stdout . on ( 'error' , error => {
18001804 throw new Error ( 'Failed to write to stdout' , { cause : error } )
18011805 } )
0 commit comments