Skip to content

Commit 765e628

Browse files
[FIX]: 시나리오생성 500 에러 수정 (#116)
* [FIX] 시나리오생성 500 에러 수정 * [FIX] 시나리ì필ìCHORE¹�않은 파일 삭제
1 parent 72a9fb3 commit 765e628

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

back/src/main/java/com/back/domain/scenario/service/ScenarioService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ private void ensureSameLine(DecisionLine line, DecisionNodeNextRequest lastDecis
237237
"parent decision node not found: " + lastDecision.parentDecisionNodeId()
238238
));
239239

240+
// DecisionLine null 체크 (데이터 무결성 검증)
241+
if (parent.getDecisionLine() == null) {
242+
throw new ApiException(ErrorCode.INVALID_INPUT_VALUE,
243+
"Parent DecisionNode's DecisionLine is missing (data corruption). DecisionNode ID: " + parent.getId());
244+
}
245+
240246
// 같은 라인인지 강제
241247
if (!parent.getDecisionLine().getId().equals(line.getId())) {
242248
throw new ApiException(ErrorCode.INVALID_INPUT_VALUE, "parent node does not belong to the target line");

0 commit comments

Comments
 (0)