-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Epic: #11 (Epic 4: Edge Cases, Performance & Testing)
Type: Enhancement
Priority: P2 (Medium)
Estimate: 0.5 day
Description
Add retry logic to API requests with exponential backoff to handle transient network failures and improve reliability.
Acceptance Criteria
- Retry failed API requests up to 3 times
- Use exponential backoff: 1s, 2s, 4s delays
- Only retry on network errors (not 4xx client errors)
- Show loading state during retries
- Display error message after max retries exceeded
- Log retry attempts for debugging
Technical Notes
- Add retry utility function in
useSentiment.ts - Check response status: retry on 5xx, timeout, network errors
- Don't retry on 4xx (client errors like 404, 400)
- Use
setTimeoutfor delay between retries - Consider abort controller for request cancellation
Dependencies
- Blocks: None
- Blocked by: None (can work in parallel with Epic 1)
Test Coverage
- Unit test: retry count, backoff timing
- Integration test: simulate network failures
- E2E test: TC-19 (API failure handling)
Related Files
app/composables/useSentiment.tsspecs/004-sentiment-detail/testplan.md(TC-19)
Part of Feature 004: Sentiment Detail Breakdown Page