style(recipe): cambio mensaje de error

parent 6ce1d868
......@@ -18,7 +18,7 @@ public class DeleteRecipeUseCaseImpl implements DeleteRecipeUseCase {
@Override
public void delete(String id) {
RecipeDocument recipeDocument = readRepository.readById(id)
.orElseThrow(() -> new EntityNotFoundException("La receta con id " + id + " no existe"));
.orElseThrow(() -> new EntityNotFoundException("Receta con id " + id + " no encontrada"));
deleteRepository.delete(recipeDocument);
}
}
......@@ -23,7 +23,7 @@ public class ReadRecipeUseCaseImpl implements ReadRecipeUseCase {
@Override
public Recipe readById(String id) {
RecipeDocument recipeDocument = repository.readById(id)
.orElseThrow(() -> new EntityNotFoundException("La receta con id " + id + " no existe"));
.orElseThrow(() -> new EntityNotFoundException("Receta con id " + id + " no encontrada"));
return mapper.mapDocument(recipeDocument);
}
......
......@@ -16,7 +16,7 @@ public class UpdateRecipeRepositoryImpl implements UpdateRecipeRepository {
@Override
public RecipeDocument update(String id, RecipeDocument recipeDocument) {
RecipeDocument recipe = recipeRepository.findById(id)
.orElseThrow(() -> new EntityNotFoundException("La receta con id " + id + " no existe"));
.orElseThrow(() -> new EntityNotFoundException("Receta con id " + id + " no encontrada"));
recipe.setName(recipeDocument.getName());
recipe.setDescription(recipeDocument.getDescription());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment