From b678ad3b47e9e94be812a80d36c8e9a20e8f9614 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Apr 2023 11:52:42 +0200 Subject: [PATCH] fix(API): Add a log entry when an error occurs so the admin can pass on information to the developers Signed-off-by: Joas Schilling --- lib/Controller/ApiController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 86a41e9f..bcf95e7b 100755 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -112,6 +112,7 @@ public function getRelatedResources(string $providerId, string $itemId): DataRes return new DataResponse($new); } catch (Exception $e) { + $this->logger->error($e->getMessage(), ['exception' => $e]); throw new OCSException( ($e->getMessage() === '') ? get_class($e) : $e->getMessage(), Http::STATUS_BAD_REQUEST