Commit ad0cea97 by Tim Orme Committed by GitHub

repository/legacy: log auth failures

Resolves: #2576
parent 3ec2e98c
...@@ -382,4 +382,10 @@ class LegacyRepository(PyPiRepository): ...@@ -382,4 +382,10 @@ class LegacyRepository(PyPiRepository):
except requests.HTTPError as e: except requests.HTTPError as e:
raise RepositoryError(e) raise RepositoryError(e)
if response.status_code in (401, 403):
self._log(
"Authorization error accessing {url}".format(url=url), level="warn"
)
return
return Page(url, response.content, response.headers) return Page(url, response.content, response.headers)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment