Fix edge function logging and types

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 19:57:27 +00:00
parent 99ceacfe0c
commit 6fbaf0c606
9 changed files with 175 additions and 62 deletions

View File

@@ -83,12 +83,15 @@ const queryClient = new QueryClient({
gcTime: 5 * 60 * 1000, // 5 minutes - keep in cache for 5 mins
},
mutations: {
onError: (error: any, variables: any, context: any) => {
onError: (error: unknown, variables: unknown, context: unknown) => {
// Track mutation errors with breadcrumbs
const contextObj = context as { endpoint?: string } | undefined;
const errorObj = error as { status?: number } | undefined;
breadcrumb.apiCall(
context?.endpoint || 'mutation',
contextObj?.endpoint || 'mutation',
'MUTATION',
error?.status || 500
errorObj?.status || 500
);
// Handle error with tracking