From f66baa17d1d3b9af3def34617036e8f4190f344d Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Thu, 20 Jun 2019 18:04:52 +0200 Subject: [PATCH] Forward OCSException to initiator Signed-off-by: Daniel Kesselberg --- apps/provisioning_api/lib/Controller/UsersController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 30094470a7a..3e46d472e8d 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.', -- 2.39.5