Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

모집의뢰서 중복 예외처리 오류 수정 #98

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/company/src/hooks/apis/useRecruitmentsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ export const useCreateRecruitmentRequest = () => {
router.push("/my");
},
onError: (err: AxiosError<AxiosError>) => {
console.log(err);

if (err.response?.status === 400) {
toast({
payload: {
type: "error",
message: "입력되지 않은 필드가 있습니다.",
},
});
} else if (err.response?.data.message === "Recruitment Already Exist") {
} else if (err.response?.status === 409) {
toast({
payload: {
type: "error",
Expand Down