Fix edge function console statements

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 19:16:06 +00:00
parent c0f468451f
commit ba6bb8a317
9 changed files with 78 additions and 76 deletions

View File

@@ -11,9 +11,11 @@ interface AdminErrorBoundaryProps {
section?: string; // e.g., "Moderation", "Users", "Settings"
}
type ErrorWithId = Error & { errorId: string };
interface AdminErrorBoundaryState {
hasError: boolean;
error: Error | null;
error: ErrorWithId | null;
errorInfo: ErrorInfo | null;
}
@@ -43,7 +45,7 @@ export class AdminErrorBoundary extends Component<AdminErrorBoundaryProps, Admin
static getDerivedStateFromError(error: Error): Partial<AdminErrorBoundaryState> {
return {
hasError: true,
error,
error: error as ErrorWithId,
};
}
@@ -60,7 +62,7 @@ export class AdminErrorBoundary extends Component<AdminErrorBoundaryProps, Admin
errorId,
});
this.setState({ errorInfo, error: { ...error, errorId } as any });
this.setState({ errorInfo, error: { ...error, errorId } as ErrorWithId });
}
handleRetry = () => {