Skip to content

fix: treat status_code == 0 as a successfully-received response (#3027) - #3085

Open
Dev9269 wants to merge 1 commit into
sherlock-project:masterfrom
Dev9269:fix/status-code-none-check
Open

fix: treat status_code == 0 as a successfully-received response (#3027)#3085
Dev9269 wants to merge 1 commit into
sherlock-project:masterfrom
Dev9269:fix/status-code-none-check

Conversation

@Dev9269

@Dev9269 Dev9269 commented Aug 20, 2026

Copy link
Copy Markdown

Closes #3027

get_response used if response.status_code: to detect a successfully-received response. The truthiness test silently treats status_code == 0 as a failure (impossible for real HTTP, but the response object could report it), and a future Response reporting status_code as None would crash the comparison.

Replaced with an explicit response is not None and response.status_code is not None check so any integer status code is treated as a received response, and the actual status semantics (200/300/400 handling) are decided downstream by the site's error metadata, unchanged.

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