import { IconAlertCircle as AlertCircle } from '@tabler/icons-react' import { toPublicErrorPayload } from '@/lib/errors/public-error' import { Card } from '@/components/ui/card' interface ChatErrorProps { error: Error | string | null | undefined } export function ChatError({ error }: ChatErrorProps) { if (!error) return null const errorMessage = toPublicErrorPayload(error).error return (

{errorMessage}

) }