diff --git a/src/Command/UserUpdate.php b/src/Command/UserUpdate.php index ebb78c84..3153fc59 100644 --- a/src/Command/UserUpdate.php +++ b/src/Command/UserUpdate.php @@ -43,6 +43,14 @@ protected function execute(InputInterface $input, OutputInterface $output) : int { $userId = (int)$input->getArgument('userId'); + try { + $this->userApi->fetchUser($userId); + } catch (\RuntimeException $e) { + $this->generateOutput($output, 'User id does not exist: ' . $userId); + + return Command::FAILURE; + } + try { $email = $input->getOption('email'); if ($email !== null) {