diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c47a0126e7..2e9087bb55 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -36,6 +36,10 @@ v35.0.0 (2025-06-23) - Add "Package Compliance Alert" chart in the Policies section. https://github.com/aboutcode-org/scancode.io/pull/1699 +- Catch ``NotImplementedError`` in ``get_unique_unresolved_purls`` and properly + log error in project. + https://github.com/aboutcode-org/scancode.io/pull/1700 + v34.11.0 (2025-05-02) --------------------- diff --git a/scanpipe/pipes/purldb.py b/scanpipe/pipes/purldb.py index 98224728f9..fd35b3c147 100644 --- a/scanpipe/pipes/purldb.py +++ b/scanpipe/pipes/purldb.py @@ -318,8 +318,12 @@ def get_unique_unresolved_purls(project): try: vers = range_class.from_native(extracted_requirement) - except (InvalidVersionRange, InvalidVersion) as exception: - if exception is InvalidVersionRange: + except ( + InvalidVersionRange, + InvalidVersion, + NotImplementedError, + ) as exception: + if exception in (InvalidVersionRange, NotImplementedError): description = "Version range is invalid or unsupported" else: description = "Extracted requirement is not a valid version"