From 7ec45ae056647d2ef9ac7894126d3bf0aa2b8b1a Mon Sep 17 00:00:00 2001 From: jikwan0327 Date: Mon, 7 Oct 2024 00:26:25 +0900 Subject: [PATCH] =?UTF-8?q?fix=20::=20=EB=AA=A8=EC=A7=91=EC=9D=98=EB=A2=B0?= =?UTF-8?q?=EC=84=9C=20=EC=A4=91=EB=B3=B5=20=EC=98=88=EC=99=B8=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/company/src/hooks/apis/useRecruitmentsApi.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/company/src/hooks/apis/useRecruitmentsApi.ts b/apps/company/src/hooks/apis/useRecruitmentsApi.ts index b3b1d044..ffd87fc8 100644 --- a/apps/company/src/hooks/apis/useRecruitmentsApi.ts +++ b/apps/company/src/hooks/apis/useRecruitmentsApi.ts @@ -34,6 +34,8 @@ export const useCreateRecruitmentRequest = () => { router.push("/my"); }, onError: (err: AxiosError) => { + console.log(err); + if (err.response?.status === 400) { toast({ payload: { @@ -41,7 +43,7 @@ export const useCreateRecruitmentRequest = () => { message: "입력되지 않은 필드가 있습니다.", }, }); - } else if (err.response?.data.message === "Recruitment Already Exist") { + } else if (err.response?.status === 409) { toast({ payload: { type: "error",