Merge pull request #25589 from nextcloud/provisioning-api-invalid-argument
forward invalid argument message to frontend when creating a user fails
This commit is contained in:
commit
4a9f3ef232
|
@ -445,6 +445,13 @@ class UsersController extends AUserData {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
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->error('Failed addUser attempt with exception.',
|
$this->logger->error('Failed addUser attempt with exception.',
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue