Forward OCSException to initiator

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/16192/head
Daniel Kesselberg 2019-06-20 18:04:52 +07:00 committed by Backportbot
parent d851e4daa1
commit f66baa17d1
1 changed files with 8 additions and 1 deletions

@ -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.',