diff --git a/src/app/action/controllers/PreProcessActionController.php b/src/app/action/controllers/PreProcessActionController.php index 82104d40fc302288610812d4c22d47d0d8b556a9..5fa2c511124af85f377b1bf5aeedb5f8d5dd9dca 100755 --- a/src/app/action/controllers/PreProcessActionController.php +++ b/src/app/action/controllers/PreProcessActionController.php @@ -1515,11 +1515,11 @@ class PreProcessActionController $entity = UserModel::getPrimaryEntityById(['id' => $args['userId'], 'select' => ['entities.external_id']]); if (empty($entity)) { - return $response->withJson(['fatalError' => 'User has no primary entity', 'reason' => 'userHasNoPrimaryEntity']); + return $response->withStatus(400)->withJson(['errors' => 'User has no primary entity', 'lang' => 'userHasNoPrimaryEntity']); } $entityInformations = json_decode($entity['external_id'], true); if (empty($entityInformations['alfresco'])) { - return $response->withJson(['fatalError' => 'User primary entity has not enough alfresco informations', 'reason' => 'notEnoughAlfrescoInformations']); + return $response->withStatus(400)->withJson(['errors' => 'User primary entity has not enough alfresco informations', 'lang' => 'notEnoughAlfrescoInformations']); } $resourcesInformations = [];