Skip to content

Commit 13896a4

Browse files
committed
Include the HTTP status code with errors raised when obtaining documentation url.
1 parent 49f2bb7 commit 13896a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seed_intersphinx_mapping/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def get_sphinx_doc_url(pypi_name: str) -> str:
8282
# Follow redirects to get actual URL
8383
r = requests.head(list(docs_dict.values())[0], allow_redirects=True, timeout=10)
8484
if r.status_code != 200: # pragma: no cover
85-
raise ValueError("Documentation URL not found.")
85+
raise ValueError(f"Documentation URL not found: HTTP Status {r.status_code}.")
8686

8787
docs_url = r.url
8888

@@ -93,7 +93,7 @@ def get_sphinx_doc_url(pypi_name: str) -> str:
9393

9494
r = requests.head(objects_inv_url)
9595
if r.status_code != 200:
96-
raise ValueError("objects.inv not found at url.")
96+
raise ValueError(f"objects.inv not found at url: HTTP Status {r.status_code}.")
9797

9898
return docs_url
9999

0 commit comments

Comments
 (0)