Skip to content

Commit

Permalink
manage exception during circle's creation
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Oct 22, 2024
1 parent 1bbc440 commit ee7d2d6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Command/MigrateCustomGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ public function migrateTeams(): void {
$owner = $this->cachedFed($ownerId);

$this->circlesManager->startSession($owner);
$circle = $this->circlesManager->createCircle($rowCG['display_name']);
try {
$circle = $this->circlesManager->createCircle($rowCG['display_name']);
} catch (\Exception $e) {
$this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error> with data ' . json_encode($rowCG));
$this->logger->log(2, 'error while creating circle', ['exception' => $e]);
$this->circlesManager->stopSession();
continue;
}

// we get all members for this custom group
$queryMembers = $this->connection->getQueryBuilder();
Expand Down

0 comments on commit ee7d2d6

Please sign in to comment.