1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-03 06:12:53 +02:00

Add basic error handling

This commit is contained in:
Kamran Ahmed
2025-06-09 16:44:05 +01:00
parent 2ed708d7ce
commit e698410ecf

View File

@@ -150,5 +150,9 @@ export function GenerateAIDocument(props: GenerateAIDocumentProps) {
}; };
}, []); }, []);
if (error) {
return <div className="text-red-500">{error}</div>;
}
return <AIDocumentContent document={document} />; return <AIDocumentContent document={document} />;
} }