Skip to content

Commit

Permalink
[fix] 에러 메시지 구체화
Browse files Browse the repository at this point in the history
조회 시도한 Customer의 id를 명시
  • Loading branch information
Dr-KoKo committed Aug 17, 2024
1 parent 6774540 commit f7662b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public interface CustomerRepository extends JpaRepository<Customer, UUID> {
Optional<Customer> findByEmail(String email);

default Customer findByIdOrThrow(UUID id) {
return findById(id).orElseThrow(() -> new NotFoundCustomerException("존재하지 않는 사용자를 조회했습니다."));
return findById(id).orElseThrow(() -> new NotFoundCustomerException("존재하지 않는 사용자(id=" + id + ")를 조회했습니다."));
}
}

0 comments on commit f7662b0

Please sign in to comment.