"use client"; import { useEffect } from "react"; import { AlertTriangle, RefreshCw } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useI18n } from "@/i18n/i18n-context"; /** * Error boundary scoped to the `/llm-providers` route subtree. Mostly * triggered by SWR fetcher rejections (network or 5xx) when listing * provider credentials. */ export default function LLMProvidersError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { const { t } = useI18n(); useEffect(() => { console.error("LLM providers route error:", error); }, [error]); return (
{error.message || t("llmProviders.pages.errorDescription")}