에러 처리

This commit is contained in:
focp212@naver.com
2025-11-05 16:59:57 +09:00
parent fe012cbda3
commit 87e9bb76de
4 changed files with 10 additions and 10 deletions

View File

@@ -85,12 +85,11 @@ export const BillingChargePage = () => {
}, 3000);
}).catch((e: any) => {
/*
alert(e)
if(e.response?.data?.message){
showAlert(e.response?.data?.message);
return;
}
*/
});
};

View File

@@ -6,13 +6,13 @@ const globalQueryClient = new QueryClient({
// 사용자에게 에러상태를 즉시 보여주기 위해 retry false로 지정
retry: false,
refetchOnWindowFocus: true,
throwOnError: true,
throwOnError: false,
// suspense: true,
networkMode: 'always',
},
mutations: {
throwOnError: true,
throwOnError: false,
networkMode: 'always',
},
},

View File

@@ -114,12 +114,6 @@ const Pages = () => {
</Route>
<Route path="*" element={<NotFoundError />} />
</Route>
<Route element={<PullToRefreshRoute />}>
<Route element={<ProtectedRoute />}>
</Route>
</Route>
</SentryRoutes>
</GlobalAPIErrorBoundary>
</OverlayProvider>

View File

@@ -42,10 +42,17 @@ export const GlobalAPIErrorBoundary = ({ children }: Props) => {
const { reset } = useQueryErrorResetBoundary();
const { key } = useLocation();
return (
/*
<ErrorBoundary
onReset={ reset }
resetKeys={ [key] }
FallbackComponent={ FallbackComponent }
>{ children }</ErrorBoundary>
*/
<ErrorBoundary
onReset={ reset }
resetKeys={ [key] }
fallback={ null }
>{ children }</ErrorBoundary>
);
};