Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
fix: improve TOPS report error handling (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
fibble authored Feb 8, 2024
1 parent f6f33f7 commit 45bb578
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions module/Olcs/src/Controller/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 45bb578

Please sign in to comment.