[UNI-196] feat : 길찾기 결과 경로 없음 에러(422) 화면 및 커스텀 훅 추가#109
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 (
|
jpark0506
left a comment
There was a problem hiding this comment.
LGTM~ 덕분에 React Query에 대해서 더욱 자세히 배울 수 있었던 것 같습니다 고생하셨습니다!
| const removeQuery = () => { | ||
| queryClient.removeQueries({ queryKey: ['fastRoute', university?.id, origin?.nodeId, destination?.nodeId] }) | ||
| } | ||
|
|
| export class UnProcessableError extends Error { | ||
| constructor(message: string) { | ||
| super(message); | ||
| this.name = "UnProcessable"; | ||
| } | ||
| } | ||
|
|
| 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.
캐시로 빠른 길를 넘겨주는 것, 좋은 것 같습니다
#️⃣ 작업 내용
주요 기능
422 에러 추가
useQueryError 도입
트러블 슈팅
동작확인
422 에러 화면
2025-02-11.6.33.10.mp4
연관 이슈
UNI-197, UNI-198