feat(requests): record why a request failed - #3493
Conversation
Every failure in the *arr dispatch path set the same FAILED status and sent the same notificaiton, so a request rejected for mismatched season numbering was indistinguishable from one whose Sonarr was simply unreachable. Store a reason alongside the status at each failure site, and clear it when a failed request is retried.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds classified failure reasons to media requests. It persists the reasons in PostgreSQL and SQLite, records them for Radarr and Sonarr failures, verifies selected cases in tests, and clears the reason when a request is retried. ChangesMedia request failure reasons
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Failed media requests now retain a classified failure reason and clear it when retried. The persistence and retry behavior are aligned, with no remaining merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit hops through records bright Comment |
Description
A failed request gives no indication of why it failed. Whether Sonarr was unreachable, the series could not be identified, or its seasons are numbered differently than Sonarr expects, the request looks identical and offers the same unhelpful retry.
Now it records the reason a request failed and clears it when the request is retried. Nothing is displayed differently yet, that follows separately, but the cause is stored per request rather than living only in the server log.
How Has This Been Tested?
Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit
New Features
Bug Fixes
Tests