Handle queries for missing slot/group ids
This commit is contained in:
@ -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)));
|
||||
|
||||
|
Reference in New Issue
Block a user