Skip to content

Commit

Permalink
Revert "Revert "Merge branch 'master' into vtk-master""
Browse files Browse the repository at this point in the history
This reverts commit 63ee498
  • Loading branch information
Tiddo Nees committed Nov 2, 2024
1 parent 63ee498 commit 0551a7f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,18 @@ public function onDispatch(MvcEvent $e)
)
) {
$error = $this->error(401, 'You do not have sufficient permissions to access this resource');
$error->setOptions($result->getOptions());
if ($result instanceof \Laminas\View\Model\ViewModel) {
$error->setOptions($result->getOptions());
}
$e->setResult($error);

return $error;
}
} else {
$error = $this->error(401, 'No key or OAuth token was provided or the token was invalid');
$error->setOptions($result->getOptions());
if ($result instanceof \Laminas\View\Model\ViewModel) {
$error->setOptions($result->getOptions());
}
$e->setResult($error);

return $error;
Expand Down

0 comments on commit 0551a7f

Please sign in to comment.