MVC - prevent UserExceptions to end up in the crash reporter. closes https://github.com/opnsense/core/issues/6098

This commit is contained in:
Ad Schellevis 2022-10-18 21:39:40 +02:00
parent fcbceadb76
commit ac73ab9021

View File

@ -23,7 +23,9 @@ try {
echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
} catch (\Error | \Exception $e) {
error_log($e);
if (!is_a($e, 'OPNsense\Base\UserException')) {
error_log($e);
}
$response = [
'errorMessage' => $e->getMessage(),