From 4bc1a611da7776f22f2cfeee8e472038b7d8673c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 19 Apr 2020 13:48:22 +0200 Subject: Reclassify various exceptions as InsufficientPermissionsException That way they get the correct HTTP status code and they also get ignored by the logging code. Signed-off-by: Florian Pritz --- application/core/MY_Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/core') diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index 250c9d95c..f33dedbb3 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -54,7 +54,7 @@ class MY_Controller extends CI_Controller { protected function _require_cli_request() { if (!is_cli()) { - throw new \exceptions\PublicApiException("api/cli-only", "This function can only be accessed via the CLI interface"); + throw new \exceptions\InsufficientPermissionsException("api/cli-only", "This function can only be accessed via the CLI interface"); } } -- cgit v1.2.3-24-g4f1b