Skip to content

Commit

Permalink
fix: improve TOPS report error handling (dvsa/olcs-selfserve#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
fibble authored Feb 8, 2024
1 parent 3834bab commit 7766ca4
Showing 1 changed file with 6 additions and 0 deletions.
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 7766ca4

Please sign in to comment.