aboutsummaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-06-25 13:32:10 +0200
committerGitHub <noreply@github.com>2019-06-25 13:32:10 +0200
commit98244b5d6dea7304cfa431d3f391836609fd0ae4 (patch)
treef8a0e4abc2a2c6739d45313cf3d1c6e22e102a33 /apps/provisioning_api
parent5fbf304c2a1f5d2c5e6a68c28e11c5004bf79646 (diff)
parent4177653e99448ae4d40bf2214f2c4297bd33e624 (diff)
downloadnextcloud-server-98244b5d6dea7304cfa431d3f391836609fd0ae4.tar.gz
nextcloud-server-98244b5d6dea7304cfa431d3f391836609fd0ae4.zip
Merge pull request #16024 from nextcloud/bugfix/15944/fix-return-code-user-provision
Forward OCSException to initiator
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index c4afdd40fdf..93b5d62db36 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -339,13 +339,20 @@ class UsersController extends AUserData {
return new DataResponse(['id' => $userid]);
- } 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.',