Skip to content

Commit

Permalink
handle AggregatError. (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
igalklebanov authored Jul 8, 2024
1 parent 1ef3033 commit 0d1d890
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/kysely/process-migration-result-set.mts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export async function processMigrationResultSet(
failedMigration ? ` @ "${failedMigration.migrationName}"` : ''
}`,
)

if (error instanceof AggregateError) {
for (const subError of error.errors) {
consola.error(subError)
}
}

process.exit?.(1)
throw error
}
Expand Down

0 comments on commit 0d1d890

Please sign in to comment.