Skip to content

Commit 7abdce9

Browse files
committed
Propagate package version collection errors to caller
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 253109b commit 7abdce9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ The following organizations or individuals have contributed to this repo:
66
- Steven Esser @ majurg
77
- Tushar Goel @ TG1999
88
- Thomas Druez @ tdruez
9+
- Keshav Priyadarshi @ keshav-space

src/fetchcode/package_versions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def versions(purl):
5858
try:
5959
return router.process(purl)
6060
except NoRouteAvailable:
61-
return
61+
logger.error(f"Unsupported purl: {purl}")
62+
raise
6263

6364

6465
@dataclasses.dataclass(frozen=True)
@@ -521,7 +522,7 @@ def get_response(url, content_type="json", headers=None):
521522
logger.error(
522523
f"HTTP error occurred: {http_err} \n {traceback.format_exc()}",
523524
)
524-
return
525+
raise
525526

526527
if content_type == "binary":
527528
return resp.content

0 commit comments

Comments
 (0)