Skip to content

Commit

Permalink
Refactor importActorProfile function to streamline error handling and…
Browse files Browse the repository at this point in the history
… remove redundant console logs
  • Loading branch information
0marSalah committed Feb 18, 2025
1 parent 1666668 commit 89f761e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,7 @@ export async function importActorProfile(
console?.warn(`Unsupported file type: ${fileName}, skipping...`)
}
} catch (error: any) {
const errorMessage = `Error processing file ${fileName}: ${error.message}`
if (onError) {
onError(new Error(errorMessage), { fileName })
} else {
reject(new Error(errorMessage))
}
next(error)
} finally {
next() // Always continue
}
Expand Down

0 comments on commit 89f761e

Please sign in to comment.