From f68a2569bdfafdbdfc470669e0d50e32058cd0ec Mon Sep 17 00:00:00 2001 From: n-kawahito Date: Thu, 17 Sep 2026 16:36:43 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=81=AE=E4=BE=8B=E5=A4=96=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E8=A8=98=E8=BF=B0=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/app/domain/service/impl/AnalysisServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/demo/app/domain/service/impl/AnalysisServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/AnalysisServiceImpl.java index d0f3388..0764d41 100644 --- a/src/main/java/com/example/demo/app/domain/service/impl/AnalysisServiceImpl.java +++ b/src/main/java/com/example/demo/app/domain/service/impl/AnalysisServiceImpl.java @@ -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();