feat(requests): record why a request failed - #3493
fallenbagel wants to merge 1 commit into
Conversation
|
Important Review skippedThe saved review history does not include the base for the last reviewed commit. This saved history cannot establish the base for an incremental review. Comment You can disable this status message by setting the Use the checkbox below for a quick retry:
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 (1)
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, persists them in PostgreSQL and SQLite, records them for Radarr and Sonarr failures, handles TVDB conflicts, and clears the reason on retry. ChangesMedia request changes
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant MediaRequestSubscriber
participant MediaRequest
participant MediaRequestDatabase
participant RequestRoute
MediaRequestSubscriber->>MediaRequest: Set failureReason and failed status
MediaRequest->>MediaRequestDatabase: Save failure reason
RequestRoute->>MediaRequest: Clear failureReason on retry
MediaRequest->>MediaRequestDatabase: Save re-approved request
Suggested reviewers: Merge Risk: 🟡 Moderate · up to A failed media save can discard a valid TVDB association when another row has the same identifier, risking incorrect media linkage; this should be fixed before merge. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
A rabbit reads each line, Comment |
f89740d to
1410ba2
Compare
1410ba2 to
a48b7bf
Compare
a48b7bf to
04553d6
Compare
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
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.
04553d6 to
e322e13
Compare
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