diff --git a/src/EventListener/ExceptionListener.php b/src/EventListener/ExceptionListener.php index 9a6ffdd7d..53e3216da 100644 --- a/src/EventListener/ExceptionListener.php +++ b/src/EventListener/ExceptionListener.php @@ -79,6 +79,10 @@ public function onConsoleError(ConsoleErrorEvent $event): void { } } + if ($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\Response')) { + $newErrorMessage = 'Cloud API returned an unexpected data type; this could indicate a problem with your Cloud application.'; + } + $this->helpMessages[] = "You can find Acquia CLI documentation at https://docs.acquia.com/acquia-cli/"; $this->writeUpdateHelp($event); $this->writeSupportTicketHelp($event);