diff --git a/api/src/cli.ts b/api/src/cli.ts index 101d1612..30714f99 100644 --- a/api/src/cli.ts +++ b/api/src/cli.ts @@ -31,7 +31,12 @@ async function bootstrap() { process.exit(1); } else if (command === 'migration') { const migrationCommand = appContext.get(MigrationCommand); - await migrationCommand.run(restArgs); + try { + await migrationCommand.run(restArgs); + } catch (error) { + logger.error(`Migration command failed: ${error.message}`); + process.exit(1); + } } await appContext.close(); }