fix(B05,B06): 구조물 저장 실패가 횡단 저장까지 막던 것을 고친다

화면 실측에서 나왔다. 세션에 남은 미저장 구조물이 서버에 거절되자(등록되지 않은
타입 400) 예외가 B06 [저장] 전체를 중단시켜 sections/save가 아예 나가지 않았다.

flushPendingStructures를 .catch()로 감싸 토스트만 띄우고 횡단 저장은 계속한다.
미저장분은 세션에 그대로 남아 다음 [저장]에서 다시 시도된다.
This commit is contained in:
2026-08-29 11:39:03 +09:00
parent 08c0dc3228
commit cb8cf2c9d2
2 changed files with 16 additions and 5 deletions
+14 -4
View File
@@ -555,8 +555,13 @@ export async function renderB06ProfileCross(root: HTMLElement): Promise<void> {
// 조정창 구간값은 세션에만 있다 — 정본 payload를 모으기 전에 내보낸다
// (CLAUDE.md 5장: 영구저장은 [저장]·[확정]에서만).
await stationControls.flushCulvertOptions();
// B05에서 만지고 넘어온 구조물 조작분도 여기서 정본에 남긴다.
await flushPendingStructures(projectId);
// B05에서 만지고 넘어온 구조물 조작분도 여기서 정본에 남긴다. 실패해도 횡단
// 저장까지 막지는 않는다 — 미저장분은 세션에 남으므로 다시 시도할 수 있다
// (2026-08-29 실측: 타입이 거절되자 sections/save가 아예 나가지 않았다).
await flushPendingStructures(projectId).catch((error) => {
const detail = error instanceof Error ? ` ${error.message}` : "";
showToast(`구조물 저장에 실패했습니다.${detail}`, "error");
});
const edits = collectSectionEdits();
await saveSections(
projectId,
@@ -581,8 +586,13 @@ export async function renderB06ProfileCross(root: HTMLElement): Promise<void> {
// 조정창 구간값은 세션에만 있다 — 정본 payload를 모으기 전에 내보낸다
// (CLAUDE.md 5장: 영구저장은 [저장]·[확정]에서만).
await stationControls.flushCulvertOptions();
// B05에서 만지고 넘어온 구조물 조작분도 여기서 정본에 남긴다.
await flushPendingStructures(projectId);
// B05에서 만지고 넘어온 구조물 조작분도 여기서 정본에 남긴다. 실패해도 횡단
// 저장까지 막지는 않는다 — 미저장분은 세션에 남으므로 다시 시도할 수 있다
// (2026-08-29 실측: 타입이 거절되자 sections/save가 아예 나가지 않았다).
await flushPendingStructures(projectId).catch((error) => {
const detail = error instanceof Error ? ` ${error.message}` : "";
showToast(`구조물 저장에 실패했습니다.${detail}`, "error");
});
const edits = collectSectionEdits();
await confirmSections(
projectId,