Skip to content

Commit

Permalink
Merge pull request #604 from fkaercher/feature/return-exception
Browse files Browse the repository at this point in the history
Return instead of throw exception
  • Loading branch information
ramueSVA authored Sep 25, 2024
2 parents 1bd585b + 9dcf878 commit 3148a97
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1250,10 +1250,7 @@ public byte[] getInfoDocBytes(Long id, String userId, Locale locale) {
Project project =
projectRepository
.findById(id)
.orElseThrow(
() -> {
throw new BadRequestException(ProjectService.class, PROJECT_NOT_FOUND);
});
.orElseThrow(() -> new BadRequestException(ProjectService.class, PROJECT_NOT_FOUND));
ProjectDto projectDto = projectMapper.convertToDto(project);
try {
return projectDocCreator.getDocBytesOfProject(projectDto, locale);
Expand Down

0 comments on commit 3148a97

Please sign in to comment.