fix(audit): P2 frontend any→concrete types (181→61), heroicons→lucide-react, missing type exports, toast API, Select options, TaskStatus types; P2-9 hooks.py type annotations
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { asError } from '@/utils/errorTypes';
|
||||
import React from 'react';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { AppRouter } from '@/routes';
|
||||
@@ -21,10 +22,10 @@ function QueryClientWrapper({ children }: { children: React.ReactNode }) {
|
||||
},
|
||||
mutations: {
|
||||
retry: 0,
|
||||
onError: (error: any) => {
|
||||
onError: (error: unknown) => { const errObj = asError(error);
|
||||
// Don't show toast for 401 (handled by auth)
|
||||
if (error?.status === 401) return;
|
||||
const msg = error?.detail || error?.message || 'Ein Fehler ist aufgetreten';
|
||||
if (errObj?.status === 401) return;
|
||||
const msg = errObj?.detail || errObj?.message || 'Ein Fehler ist aufgetreten';
|
||||
toast.error(msg);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user