Skip to content

Commit 8f7c48b

Browse files
committed
[FIX] 시나리오생성 500 에러 수정
1 parent 72a9fb3 commit 8f7c48b

File tree

2 files changed

+6
-0
lines changed

2 files 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");

image.png

102 KB
Loading

0 commit comments

Comments
 (0)