관계도 저장 시 모달 및 이름 중복 안내 구현

This commit is contained in:
hyeonsu
2025-09-19 15:47:35 +09:00
parent 11b1743f6b
commit 61aac5c5c3
6 changed files with 411 additions and 200 deletions

View File

@@ -126,9 +126,9 @@ apiClient.interceptors.response.use(
// 409 에러 (중복 데이터)는 조용하게 처리
if (status === 409) {
// 중복 검사 API 완전히 조용하게 처리
if (url?.includes("/check-duplicate")) {
// 중복 검사 정상적인 비즈니스 로직이므로 콘솔 출력 없음
// 중복 검사 API와 관계도 저장은 완전히 조용하게 처리
if (url?.includes("/check-duplicate") || url?.includes("/dataflow-diagrams")) {
// 중복 검사와 관계도 중복 이름은 정상적인 비즈니스 로직이므로 콘솔 출력 없음
return Promise.reject(error);
}

View File

@@ -824,7 +824,15 @@ export class DataFlowAPI {
return response.data.data as JsonDataFlowDiagram;
} catch (error) {
console.error("JSON 관계도 생성 오류:", error);
// 409 에러(중복 이름)는 콘솔 로그 출력하지 않음
if (error && typeof error === "object" && "response" in error) {
const axiosError = error as any;
if (axiosError.response?.status !== 409) {
console.error("JSON 관계도 생성 오류:", error);
}
} else {
console.error("JSON 관계도 생성 오류:", error);
}
throw error;
}
}
@@ -859,7 +867,15 @@ export class DataFlowAPI {
return response.data.data as JsonDataFlowDiagram;
} catch (error) {
console.error("JSON 관계도 수정 오류:", error);
// 409 에러(중복 이름)는 콘솔 로그 출력하지 않음
if (error && typeof error === "object" && "response" in error) {
const axiosError = error as any;
if (axiosError.response?.status !== 409) {
console.error("JSON 관계도 수정 오류:", error);
}
} else {
console.error("JSON 관계도 수정 오류:", error);
}
throw error;
}
}