[FIX]ユーザー取得の例外処理を記述しました
This commit is contained in:
@@ -33,7 +33,9 @@ public class AnalysisServiceImpl implements AnalysisService {
|
||||
public AnalysisModel getAnalysis(Long userId) {
|
||||
|
||||
// ユーザー情報取得、月別使用可能資金取得
|
||||
UserEntity userEntity = userRepository.findById(userId).orElseThrow();
|
||||
UserEntity userEntity = userRepository.findById(userId).orElseThrow(() ->
|
||||
new RuntimeException(
|
||||
"User not found."));
|
||||
|
||||
// コースID取得
|
||||
Long courseId = userEntity.getCourseEntity().getCourseId();
|
||||
|
||||
Reference in New Issue
Block a user