Uh oh!
There was an error while loading. Please reload this page.
fix(reddit): remove unreachable 429 check after raise_for_status() - #15176
fix(reddit): remove unreachable 429 check after raise_for_status()#15176priya-sundaram-dev wants to merge 1 commit into
Conversation
Closing this pull request as invalid@priya-sundaram-dev, this pull request is being closed as none of the checkboxes have been marked. It is important that you go through the checklist and mark the ones relevant to this pull request. Please read the Contributing guidelines. If you're facing any problem on how to mark a checkbox, please read the following instructions:
NOTE: Only |
priya-sundaram-dev
commented
Sep 3, 2026
Re-filed as #15177 with the required PR checklist completed (algorithms-keeper auto-closed this one because the checklist boxes weren't marked). Same one-line fix; superseding this PR. |
Addresses the genuine bug @cclauss flagged in #15174 (
web_programming/reddit.py).Two problems with the removed lines:
response.raise_for_status()already raiseshttpx.HTTPStatusErrorfor every 4xx/5xx response, including 429, so the followingif response.status_code == 429can never be true — execution never reaches it.httpx.HTTPError.__init__(self, message)takes a message string and has noresponseparameter, sohttpx.HTTPError(response=response)would raiseTypeErrorif it ever ran. (This is exactly theunknown-argument/missing-argumentdiagnostictyreports on this file.)The fix keeps
raise_for_status()— the intended rate-limit behaviour is preserved — and drops the dead branch, with a short comment explaining why no extra status check is needed. The__main__note about Error 429 still applies.Checklist: