@@ -192,7 +192,7 @@ export async function importActorProfile(
192
192
onError ?: ( error : Error , context : { fileName ?: string } ) => void
193
193
} = { }
194
194
) : Promise < Record < string , any > > {
195
- const { console = undefined , onError = undefined } = options
195
+ const { console = undefined } = options
196
196
const extract = tar . extract ( )
197
197
const result : Record < string , any > = { }
198
198
@@ -239,7 +239,7 @@ export async function importActorProfile(
239
239
240
240
stream . on ( 'error' , ( error : any ) => {
241
241
console ?. error ( `Stream error on file ${ fileName } :` , error . message )
242
- next ( ) // Continue even on stream error
242
+ next ( error ) // Continue even on stream error
243
243
} )
244
244
} )
245
245
@@ -249,12 +249,12 @@ export async function importActorProfile(
249
249
} )
250
250
251
251
extract . on ( 'error' , ( error ) => {
252
- console . error ( 'Error during tar extraction:' , error . message )
252
+ console ? .error ( 'Error during tar extraction:' , error . message )
253
253
reject ( new Error ( 'Failed to extract tar file.' ) )
254
254
} )
255
255
256
256
tarStream . on ( 'error' , ( error ) => {
257
- console . error ( 'Error in tar stream:' , error . message )
257
+ console ? .error ( 'Error in tar stream:' , error . message )
258
258
reject ( new Error ( 'Failed to process tar stream.' ) )
259
259
} )
260
260
0 commit comments