Skip to content

Fix key repository failover for HTTP server errors - #188

Open
Shubham-Padkonde wants to merge 1 commit into
atlassian:mainfrom
Shubham-Padkonde:fix/preserve-key-server-error-status
Open

Shubham-Padkonde wants to merge 1 commit into
atlassian:mainfrom
Shubham-Padkonde:fix/preserve-key-server-error-status

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

An HTTP error response is falsey in requests. Checking if e.response therefore discards the status for real 4xx/5xx responses, and a 503 from the first key repository stops retrieval instead of trying the next repository.

Check explicitly for None so the existing failover policy receives the actual status. The new tests use real requests.Response objects to verify both server-error failover and client-error propagation without failover; the earlier mock response tests did not expose this distinction.

Both regressions fail before the fix. All 95 core tests pass afterward, and changed-file Ruff checks pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant