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",