From b5c955b593bc253a4389df5ef128e9dbc38d5b6d Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kisseberth" Date: Wed, 11 Sep 2024 14:25:21 -0700 Subject: [PATCH] add MethodNotAllowedException to abort handler --- core/libraries/Hubzero/Base/Application.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/libraries/Hubzero/Base/Application.php b/core/libraries/Hubzero/Base/Application.php index 9f6eb510a0b..69497e0bb88 100644 --- a/core/libraries/Hubzero/Base/Application.php +++ b/core/libraries/Hubzero/Base/Application.php @@ -10,6 +10,7 @@ use Hubzero\Container\Container; use Hubzero\Error\Exception\NotAuthorizedException; use Hubzero\Error\Exception\NotFoundException; +use Hubzero\Error\Exception\MethodNotAllowedException; use Hubzero\Error\Exception\RuntimeException; use Hubzero\Facades\Facade; use Hubzero\Http\RedirectResponse; @@ -265,6 +266,10 @@ public function abort($code, $message='') { switch ($code) { + case 405: + throw new MethodNotAllowedException($message, $code); + break; + case 404: throw new NotFoundException($message, $code); break;