Add try catch to command (#8381)

fixes 0-32 command
This commit is contained in:
martmull
2024-11-07 11:27:33 +01:00
committed by GitHub
parent 545cfbd83e
commit f3a38679ae

View File

@@ -31,6 +31,7 @@ export class CopyWebhookOperationIntoOperationsCommand extends ActiveWorkspacesC
this.logger.log('Running command to copy operation to operations'); this.logger.log('Running command to copy operation to operations');
for (const workspaceId of activeWorkspaceIds) { for (const workspaceId of activeWorkspaceIds) {
try {
this.logger.log(`Running command for workspace ${workspaceId}`); this.logger.log(`Running command for workspace ${workspaceId}`);
const webhookRepository = const webhookRepository =
@@ -66,10 +67,19 @@ export class CopyWebhookOperationIntoOperationsCommand extends ActiveWorkspacesC
}); });
this.logger.log( this.logger.log(
chalk.yellow(`Handled webhook operation updates for ${webhook.id}`), chalk.yellow(
`Handled webhook operation updates for ${webhook.id}`,
),
);
}
}
} catch (e) {
this.logger.log(
chalk.red(
`Error when running command on workspace ${workspaceId}: ${e}`,
),
); );
} }
} }
} }
} }
}