diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-03-05 08:59:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 08:59:50 +0100 |
commit | 4a9f3ef23285e4ad3a37300cf764b9eaf2403476 (patch) | |
tree | fd0842a189d9c3032934b41164f2e90693c58cc2 /apps/provisioning_api | |
parent | ffdacf813e9ec511f4dd6e8824ec4dd2857c8542 (diff) | |
parent | c6ce1eb557eedca1e1716e6748cbe2a129e7f0e4 (diff) | |
download | nextcloud-server-4a9f3ef23285e4ad3a37300cf764b9eaf2403476.tar.gz nextcloud-server-4a9f3ef23285e4ad3a37300cf764b9eaf2403476.zip |
Merge pull request #25589 from nextcloud/provisioning-api-invalid-argument
forward invalid argument message to frontend when creating a user fails
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index b4a0c557539..6311576dff6 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -445,6 +445,13 @@ class UsersController extends AUserData { ] ); throw $e; + } catch (\InvalidArgumentException $e) { + $this->logger->logException($e, [ + 'message' => 'Failed addUser attempt with invalid argument exeption.', + 'level' => ILogger::ERROR, + 'app' => 'ocs_api', + ]); + throw new OCSException($e->getMessage(), 101); } catch (\Exception $e) { $this->logger->error('Failed addUser attempt with exception.', [ |