]> source.dussan.org Git - nextcloud-server.git/commitdiff
Forward OCSException to initiator 16192/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Thu, 20 Jun 2019 16:04:52 +0000 (18:04 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Tue, 2 Jul 2019 10:34:53 +0000 (10:34 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/provisioning_api/lib/Controller/UsersController.php

index 30094470a7aa00afa05a948432014a649e62a5bd..3e46d472e8db2d71a42601bcc46fc7a0af8529c9 100644 (file)
@@ -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.',