diff --git a/lib/Controller/UsersController.php b/lib/Controller/UsersController.php index 043759e7..a1316b5f 100644 --- a/lib/Controller/UsersController.php +++ b/lib/Controller/UsersController.php @@ -181,12 +181,16 @@ public function get(string $userId): DataResponse { public function transfer(string $guestUserId, string $targetUserId): DataResponse { $author = $this->userSession->getUser(); if (!($author instanceof IUser)) { - return new DataResponse([], Http::STATUS_UNAUTHORIZED); + return new DataResponse([ + 'message' => $this->l10n->t('Failed to authorize') + ], Http::STATUS_UNAUTHORIZED); } $sourceUser = $this->userManager->get($guestUserId); if (!($sourceUser instanceof IUser)) { - return new DataResponse([], Http::STATUS_NOT_FOUND); + return new DataResponse([ + 'message' => $this->l10n->t('Guest does not exist') + ], Http::STATUS_NOT_FOUND); } if ($this->userManager->userExists($targetUserId)) {