From: Daniel Kesselberg Date: Thu, 20 Jun 2019 16:04:52 +0000 (+0200) Subject: Forward OCSException to initiator X-Git-Tag: v16.0.2~5^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F16191%2Fhead;p=nextcloud-server.git Forward OCSException to initiator Signed-off-by: Daniel Kesselberg --- diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index b993188c97e..ce2215d9749 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -317,13 +317,20 @@ class UsersController extends AUserData { return new DataResponse(); - } catch (HintException $e ) { + } catch (HintException $e) { $this->logger->logException($e, [ 'message' => 'Failed addUser attempt with hint exception.', 'level' => ILogger::WARN, 'app' => 'ocs_api', ]); throw new OCSException($e->getHint(), 107); + } catch (OCSException $e) { + $this->logger->logException($e, [ + 'message' => 'Failed addUser attempt with ocs exeption.', + 'level' => ILogger::ERROR, + 'app' => 'ocs_api', + ]); + throw $e; } catch (\Exception $e) { $this->logger->logException($e, [ 'message' => 'Failed addUser attempt with exception.',