-
Notifications
You must be signed in to change notification settings - Fork 2
[UNI-196] feat : 길찾기 결과 경로 없음 에러(422) 화면 및 커스텀 훅 추가 #109
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
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~ 덕분에 React Query에 대해서 더욱 자세히 배울 수 있었던 것 같습니다 고생하셨습니다!
const removeQuery = () => { | ||
queryClient.removeQueries({ queryKey: ['fastRoute', university?.id, origin?.nodeId, destination?.nodeId] }) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수로 분리한 점 좋은 것 같습니다!
export class UnProcessableError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = "UnProcessable"; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확장성이 좋은 것 같습니다 굳~
queryKey: ['fastRoute', university.id, origin?.nodeId, destination?.nodeId], | ||
queryFn: () => getNavigationResult(university.id, origin ? origin?.nodeId : -1, destination ? destination?.nodeId : -1), | ||
enabled: false, | ||
retry: 0, | ||
}, | ||
undefined, | ||
() => { navigate('/result') }, | ||
{ | ||
fallback: { | ||
400: { | ||
mainTitle: "잘못된 요청입니다.", subTitle: ["새로고침 후 다시 시도 부탁드립니다."] | ||
}, | ||
404: { | ||
mainTitle: "해당 경로를 찾을 수 없습니다.", subTitle: ["해당 건물이 길이랑 연결되지 않았습니다."] | ||
}, | ||
422: { | ||
mainTitle: "해당 경로를 찾을 수 없습니다.", subTitle: ["위험 요소 버튼을 클릭하여,", "통행할 수 없는 원인을 파악하실 수 있습니다."] | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
캐시로 빠른 길를 넘겨주는 것, 좋은 것 같습니다
#️⃣ 작업 내용
주요 기능
422 에러 추가
useQueryError 도입
트러블 슈팅
동작확인
422 에러 화면
2025-02-11.6.33.10.mp4
연관 이슈
UNI-197, UNI-198