diff --git a/module/Olcs/src/Controller/DashboardController.php b/module/Olcs/src/Controller/DashboardController.php index 47aea342c..fd09895e0 100644 --- a/module/Olcs/src/Controller/DashboardController.php +++ b/module/Olcs/src/Controller/DashboardController.php @@ -76,6 +76,12 @@ public function topsreportAction() 'refreshToken' => $session['RefreshToken']] ); $response = $this->handleCommand($redirectCmd); + + if (!$response->isOk()) { + $this->flashMessenger()->addErrorMessage($response->getResult()['messages'][0]); + return $this->redirect()->toRoute('dashboard', [], [], true); + } + $messages = $response->getResult()['messages']; $view = new \Laminas\View\Model\ViewModel();