diff options
Diffstat (limited to 'lib/rfq-last/vendor/send-rfq-dialog.tsx')
| -rw-r--r-- | lib/rfq-last/vendor/send-rfq-dialog.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rfq-last/vendor/send-rfq-dialog.tsx b/lib/rfq-last/vendor/send-rfq-dialog.tsx index e63086ad..42470ecc 100644 --- a/lib/rfq-last/vendor/send-rfq-dialog.tsx +++ b/lib/rfq-last/vendor/send-rfq-dialog.tsx @@ -812,8 +812,12 @@ export function SendRfqDialog({ hasToSendEmail: hasToSendEmail, }); + if (!sendResult) { + throw new Error("서버 응답이 없습니다."); + } + if (!sendResult.success) { - throw new Error(sendResult.message); + throw new Error(sendResult.message || "RFQ 발송에 실패했습니다."); } toast.success(sendResult.message); @@ -821,7 +825,7 @@ export function SendRfqDialog({ } catch (error) { console.error("RFQ 발송 실패:", error); - toast.error("RFQ 발송에 실패했습니다."); + toast.error(error instanceof Error ? error.message : "RFQ 발송에 실패했습니다."); } finally { setIsSending(false); setIsGeneratingPdfs(false); |
