feat: Enhance error handling with showErrorToast utility

- Replaced existing toast error messages with the new `showErrorToast` utility across multiple components, improving consistency in error reporting.
- Updated error messages to provide more specific guidance for users, enhancing the overall user experience during error scenarios.
- Ensured that all relevant error handling in batch management, external call configurations, cascading management, and screen management components now utilizes the new utility for better maintainability.
This commit is contained in:
kjs
2026-03-03 16:04:11 +09:00
parent ce8b4ed688
commit f04d224b09
49 changed files with 458 additions and 180 deletions

View File

@@ -33,6 +33,7 @@ import {
Save,
} from "lucide-react";
import { toast } from "sonner";
import { showErrorToast } from "@/lib/utils/toastUtils";
import { ScreenDefinition } from "@/types/screen";
import { screenApi } from "@/lib/api/screen";
import { PopScreenGroup, getPopScreenGroups } from "@/lib/api/popScreenGroup";
@@ -191,7 +192,7 @@ export function PopScreenSettingModal({
onOpenChange(false);
} catch (error) {
console.error("저장 실패:", error);
toast.error("저장에 실패했습니다.");
showErrorToast("POP 화면 설정 저장에 실패했습니다", error, { guidance: "입력 데이터를 확인하고 다시 시도해 주세요." });
} finally {
setSaving(false);
}