Skip to content

Commit

Permalink
Merge branch 'master' into vtk-master
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiddo committed Oct 30, 2024
2 parents 01f364b + 76a9173 commit c30ee52
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 c30ee52

Please sign in to comment.