-
-
Notifications
You must be signed in to change notification settings - Fork 45
Code Quality: Add timeout handling for jAI service requests #221
Copy link
Copy link
Open
Labels
↗️ medium priorityThis issue is crucialThis issue is crucial🔴 wontfixThis will not be worked on for nowThis will not be worked on for now✨ enhancementNew feature or request or improvementNew feature or request or improvementbackendChanges related to apisChanges related to apis✨jaiIssues, PRs or questions related to the ✨jAI moduleIssues, PRs or questions related to the ✨jAI module
Metadata
Metadata
Assignees
Labels
↗️ medium priorityThis issue is crucialThis issue is crucial🔴 wontfixThis will not be worked on for nowThis will not be worked on for now✨ enhancementNew feature or request or improvementNew feature or request or improvementbackendChanges related to apisChanges related to apis✨jaiIssues, PRs or questions related to the ✨jAI moduleIssues, PRs or questions related to the ✨jAI module
Problem
The jAI search API endpoint (
src/pages/api/jai/search.js) does not currently implement a timeout for requests to the AI service. If the AI service is slow or unresponsive, the API may hang indefinitely, leading to poor user experience.Current Behavior
Expected Behavior
Location
File:
src/pages/api/jai/search.jsProposed Implementation
Steps to Complete
Promise.raceto race the AI call and the timeout.Definition of Done