diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2017-03-20 18:10:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 18:10:05 +0100 |
commit | 03a92eaf74ea3898f67a12e3c19216683abb44d8 (patch) | |
tree | 533fa317e6b1ef57a4a3f391b84e9778268b2312 /apps | |
parent | be9ae45a4b8ced2173d1322a2d78a670e706e878 (diff) | |
parent | 5795482282bed45c678b26799da83e4da4ae2978 (diff) | |
download | nextcloud-server-03a92eaf74ea3898f67a12e3c19216683abb44d8.tar.gz nextcloud-server-03a92eaf74ea3898f67a12e3c19216683abb44d8.zip |
Merge pull request #3957 from nextcloud/downstream-27307
Follow up to #3949 (app exists on enable)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/provisioning_api/lib/Controller/AppsController.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/AppsController.php b/apps/provisioning_api/lib/Controller/AppsController.php index e384d5af907..1165c7b8564 100644 --- a/apps/provisioning_api/lib/Controller/AppsController.php +++ b/apps/provisioning_api/lib/Controller/AppsController.php @@ -26,7 +26,9 @@ namespace OCA\Provisioning_API\Controller; use \OC_App; +use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCSController; @@ -99,9 +101,14 @@ class AppsController extends OCSController { * @PasswordConfirmationRequired * @param string $app * @return DataResponse + * @throws OCSException */ public function enable($app) { - $this->appManager->enableApp($app); + try { + $this->appManager->enableApp($app); + } catch (AppPathNotFoundException $e) { + throw new OCSException('The request app was not found', \OCP\API::RESPOND_NOT_FOUND); + } return new DataResponse(); } |