에러 처리
This commit is contained in:
@@ -85,12 +85,11 @@ export const BillingChargePage = () => {
|
||||
}, 3000);
|
||||
|
||||
}).catch((e: any) => {
|
||||
/*
|
||||
alert(e)
|
||||
if(e.response?.data?.message){
|
||||
showAlert(e.response?.data?.message);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -114,12 +114,6 @@ const Pages = () => {
|
||||
</Route>
|
||||
<Route path="*" element={<NotFoundError />} />
|
||||
</Route>
|
||||
<Route element={<PullToRefreshRoute />}>
|
||||
<Route element={<ProtectedRoute />}>
|
||||
|
||||
|
||||
</Route>
|
||||
</Route>
|
||||
</SentryRoutes>
|
||||
</GlobalAPIErrorBoundary>
|
||||
</OverlayProvider>
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user