As a plugin writer, I can be in control when the server returns a 400+ response code
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.
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.