Repository navigation
[NEEDS CODE REVIEWER] fix: Handle failed status requests in SABnzbd check_connected - #361
Open
lolimmlost wants to merge 1 commit into
Open
lolimmlost wants to merge 1 commit into
lolimmlost wants to merge 1 commit into
Conversation
Owner
|
@jrhager84 would you be ok to review this? |
Collaborator
|
Yeah - It's on the docket for this week. |
Mirrors the qBit fix from ManiMatter#342. Previously, an HTTP error from SABnzbd's status endpoint (e.g. a 500 from a misbehaving SAB instance) would raise out of make_request and crash decluttarr entirely. Now the error is caught and treated as a disconnected client, so the cycle is skipped and retried next run — matching the behavior for qBit in ManiMatter#342. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
lolimmlost
force-pushed
the
fix/sabnzbd-check-connected-resilience
branch
from
September 29, 2026 20:58
5cc3218 to
ad45d47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors the qBit fix from #342 (just approved) for the same bug class in SABnzbd.
Previously, an HTTP error from SABnzbd's status endpoint (e.g. a 500) would raise out of
make_requestand crash decluttarr entirely. Now the error is caught and treated as a disconnected client, so the cycle is skipped and retried next run.Before: SAB returns 500 →
HTTPErrorpropagates up throughcheck_connected→_check_client_connection_status→_download_clients_connected→removal_jobs→run_jobs→main→ process exits, container restart-loops.After: SAB returns 500 → caught locally → warning logged →
Falsereturned → that client is skipped this cycle, other clients/instances continue, next cycle retries.Same shape as #342 — granular per-client handling, not a broad top-level catch.
Test plan
Smoke tested four paths against the patched
check_connected:False, warning logged, no crash{"status": True}) → returnsTruestatuskey → returnsFalseresponse.json()raises) → returnsFalseFull test suite: 198/198 passing.
Notes
check_connectedin either qbit or sabnzbd, so this stays consistent with the codebase. Happy to add tests for both if preferred.devfor consistency with [NEEDS CODE REVIEWER] Handle failed /sync/maindata requests in check_connected #342.🤖 Generated with Claude Code