Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into bugfix/bugfix_47
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo12246 authored Sep 26, 2023
2 parents 921820a + de6f257 commit c4530a4
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ public FavoriteResponse updateFavorite(UUID id, FavoriteType type, FavoriteReque
entity.setType(FavoriteType.valueOf(favoriteRequest.getfType()));
favoriteRepository.saveAndFlush(entity);
return convertFavoriteResponse(entity);
} else throw new NotFoundException(
404,
"Demand category not found",
new ArrayList<>(List.of("provided UUID did not match any records. - " + id))
);
} else {
throw new NotFoundException(
404,
"Entity to update was not found in DB." + "\n" + "Did you meant to create?",
new ArrayList<>(List.of("provided UUID did not match any records. - " + id))
);
}
}

@Override
Expand Down

0 comments on commit c4530a4

Please sign in to comment.