fix: (hopefully) fix retry conditions
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2026-02-13 11:40:00 +08:00
parent 550254b844
commit 545facba22
2 changed files with 11 additions and 11 deletions

View File

@@ -5,19 +5,19 @@ import { ThemeProvider } from '@/components/theme-provider';
import { Toaster } from '@/components/ui/sonner'; import { Toaster } from '@/components/ui/sonner';
import '@/index.css'; import '@/index.css';
function retry(failureCount: number, error: any) {
// eslint-disable-next-line ts/no-unsafe-assignment, ts/no-unsafe-member-access
const status = error?.response?.status ?? error?.code;
if (status >= 400 && status < 500) {
return false;
}
return failureCount < 3;
}
const queryClient = new QueryClient({ const queryClient = new QueryClient({
defaultOptions: { defaultOptions: {
queries: { queries: {
retry: (failureCount, error: any) => { retry,
// eslint-disable-next-line ts/no-unsafe-assignment
const status
// eslint-disable-next-line ts/no-unsafe-member-access
= error?.response?.status ?? error?.status;
if (status >= 400 && status < 500) {
return false;
}
return failureCount < 3;
},
}, },
}, },
}); });

View File

@@ -27,7 +27,7 @@ export default defineConfig({
}, },
server: { server: {
proxy: { proxy: {
'/app/api': 'http://10.0.0.10:8000', '/app/api': 'https://test.nix.org.cn',
}, },
host: '0.0.0.0', host: '0.0.0.0',
port: 5173, port: 5173,