Skip to content

Commit 029040c

Browse files
authored
[5.4] Change healthcheck response code if AU is disabled (#45966)
from 500 to 404
1 parent 8b66249 commit 029040c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/components/com_joomlaupdate/src/Controller/BaseController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
use Joomla\CMS\Component\ComponentHelper;
1414
use Joomla\CMS\MVC\Controller\ApiController;
15+
use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
1516
use Tobscure\JsonApi\Exception\InvalidParameterException;
1617

1718
abstract class BaseController extends ApiController
@@ -30,7 +31,7 @@ protected function validateUpdateToken(): void
3031
$config = ComponentHelper::getParams('com_joomlaupdate');
3132

3233
if ($config->get('updatesource') !== 'default' || (int) $config->get('minimum_stability') !== 4 || !$config->get('autoupdate')) {
33-
throw new \RuntimeException('Auto update is disabled', 404);
34+
throw new ResourceNotFound('Auto update is disabled', 404);
3435
}
3536

3637
$token = $this->input->server->get('HTTP_X_JUPDATE_TOKEN', '', 'STRING');

0 commit comments

Comments
 (0)