mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 04:50:12 +02:00
Prevent render error on missing endpoint
This commit is contained in:
@@ -22,12 +22,14 @@ const queryConfig: DefaultOptions = {
|
||||
queries: {
|
||||
cacheTime: 1000 * 60 * 3,
|
||||
onError: (err) => {
|
||||
console.error(err);
|
||||
console.error('react query error:', err);
|
||||
},
|
||||
refetchOnWindowFocus: false,
|
||||
retry: process.env.NODE_ENV === 'production',
|
||||
staleTime: 1000 * 5,
|
||||
useErrorBoundary: true,
|
||||
useErrorBoundary: (error: any) => {
|
||||
return error?.response?.status >= 500;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user