Actions
Story #7117
closedAs a plugin writer, I can be in control when the server returns a 400+ response code
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 78
Quarter:
Description
Background¶
Currently the HttpDownloader will raise an exception at response.raise_for_status()
anytime the server responds with a 400+ response code. The plugin writers are not in control of this.
In some cases a 404 should not raise an exception because a file being missing is normal. This is the case with pulp_rpm .treeinfo files. See https://pulp.plan.io/issues/7095 for that issue.
Proposal¶
Add a new hook method on HttpDownloader like this:
def raise_for_status(response):
response.raise_for_status()
Then HttpDownloader subclasses could intercept this call and customize it.
Related issues
Updated by bmbouter over 4 years ago
- Blocks Issue #7095: Pulp 3 Sync issue (.treeinfo) added
Updated by bmbouter over 4 years ago
- Groomed changed from No to Yes
- Sprint set to Sprint 77
Adding to sprint after grooming at pulpcore planning meeting on July 14th.
Updated by fao89 over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fao89
Updated by pulpbot over 4 years ago
- Status changed from ASSIGNED to POST
Added by Fabricio Aguiar over 4 years ago
Updated by Anonymous over 4 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore|ea18dc974887472c175800a096ed933a969ad0f6.
Updated by pulpbot over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
HttpDownloader
control on response codes 400+https://pulp.plan.io/issues/7117 closes #7117