-
Notifications
You must be signed in to change notification settings - Fork 282
Open
Labels
Description
Description
The application lacks proper timeout configuration and retry logic for Axios HTTP requests, leading to potential hanging requests, poor error handling, and inconsistent user experience when dealing with network failures or slow API responses.
Current Behavior
- API calls can hang indefinitely if external services are slow or unresponsive
- No retry mechanism for transient network failures (503, timeout errors, connection resets)
- Inconsistent error handling across the application:
- Some endpoints return
{ success: false } - Others throw errors directly
- No standardized error response format
- Some endpoints return
- No timeout configuration for any Axios instance
- Users experience different error behaviors depending on which part of the app they're using
Expected Behavior
- All HTTP requests should have reasonable timeout limits (10-30 seconds)
- Transient failures should automatically retry (exponential backoff, 3 attempts recommended)
- Consistent error response format across all API endpoints
- Loading states should timeout appropriately with user-friendly error messages
- External API calls should implement circuit breaker pattern to prevent cascading failures
Affected Files
Controllers:
EmailController.js:17
Vue Components:
FacialSentimentPanel.vue:221GeneralAnalytics.vue:67215+ other fileswith direct axios usage
Steps to Reproduce
- Make an API call to a slow or unresponsive endpoint
- Observe that the request hangs indefinitely with no timeout
- Trigger a transient network error (503, temporary DNS failure)
- Notice that the request fails immediately without retry
- Compare error responses from different endpoints
- Observe inconsistent error formats and handling
Why This Matters
User Impact:
- Poor user experience when network is slow or unstable
- Users don't know if the app is processing or stuck
- Inconsistent error messages cause confusion
Technical Impact:
- Resource leaks from hanging connections
- Difficult to debug network-related issues
- No resilience against temporary service outages
- Scalability issues under load
Reactions are currently unavailable