diff options
Diffstat (limited to 'apps/web/src/components/QueryAI.tsx')
| -rw-r--r-- | apps/web/src/components/QueryAI.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/web/src/components/QueryAI.tsx b/apps/web/src/components/QueryAI.tsx index 811dd899..3cb14178 100644 --- a/apps/web/src/components/QueryAI.tsx +++ b/apps/web/src/components/QueryAI.tsx @@ -82,6 +82,11 @@ function QueryAI() { const response = await fetch(`/api/query?q=${input}`); + if (response.status !== 200) { + setIsAiLoading(false); + return; + } + if (response.body) { let reader = response.body.getReader(); let decoder = new TextDecoder('utf-8'); |