Handle queries for missing slot/group ids

This commit is contained in:
2025-03-14 15:37:21 +01:00
parent 5247410218
commit 33b96007e8
4 changed files with 16 additions and 6 deletions

View File

@ -28,8 +28,13 @@ class GroupQueryCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output): int
{
$groupId = $input->getArgument("group");
$group = $this->client->queryGroup($groupId);
try {
$group = $this->client->queryGroup($groupId);
} catch (\RuntimeException $e) {
$output->writeln("<error>Invalid group id: {$slotId}</>");
return self::INVALID;
}
$len = 2 + max(array_map(mb_strlen(...), array_keys($group)));