]> source.dussan.org Git - nextcloud-server.git/commitdiff
Forward OCSException to initiator 16191/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:42 +0000 (10:34 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/provisioning_api/lib/Controller/UsersController.php

index b993188c97e1ae5d0a237338b6fd173baf09d8da..ce2215d97497e15f2461ab6fe968e49acc1f4db1 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.',