diff --git a/lib/Service/ApiService.php b/lib/Service/ApiService.php index 4244127e232..12fd1cb6c70 100644 --- a/lib/Service/ApiService.php +++ b/lib/Service/ApiService.php @@ -99,7 +99,8 @@ public function create($fileId = null, $filePath = null, $token = null, $guestNa $document = $this->documentService->createDocument($file); } catch (Exception $e) { - return new DataResponse($e->getMessage(), 500); + $this->logger->logException($e); + return new DataResponse('Failed to create the document session', 500); } $session = $this->sessionService->initSession($document->getId(), $guestName); @@ -194,9 +195,9 @@ public function sync($documentId, $sessionId, $sessionToken, $version = 0, $auto } catch (NotFoundException $e) { return new DataResponse([], 404); } catch (Exception $e) { - $this->logger->logException($e, ['level' => ILogger::INFO]); + $this->logger->logException($e); return new DataResponse([ - 'message' => $e->getMessage() + 'message' => 'Failed to autosave document' ], 500); }