Update error handling and nginx conf wip

This commit is contained in:
2025-02-25 18:16:41 +01:00
parent 68131c2ce7
commit 56108c7d37
2 changed files with 31 additions and 1 deletions
+4 -1
View File
@@ -28,7 +28,10 @@ function Typing() {
`${import.meta.env.VITE_API_URL}/generate?lang=${lang}`,
);
if (!response.ok || !response.body) return;
if (!response.ok || !response.body) {
setError(true);
return;
}
const reader = response.body.getReader();
const decoder = new TextDecoder();