forward invalid argument message to frontend when creating a user fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
5babad4f6f
commit
c6ce1eb557
|
@ -441,6 +441,13 @@ class UsersController extends AUserData {
|
||||||
'app' => 'ocs_api',
|
'app' => 'ocs_api',
|
||||||
]);
|
]);
|
||||||
throw $e;
|
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) {
|
} catch (\Exception $e) {
|
||||||
$this->logger->logException($e, [
|
$this->logger->logException($e, [
|
||||||
'message' => 'Failed addUser attempt with exception.',
|
'message' => 'Failed addUser attempt with exception.',
|
||||||
|
|
Loading…
Reference in New Issue