diff --git a/scanpipe/pipes/purldb.py b/scanpipe/pipes/purldb.py index d99c89a77..8434e3536 100644 --- a/scanpipe/pipes/purldb.py +++ b/scanpipe/pipes/purldb.py @@ -320,9 +320,9 @@ def get_unique_unresolved_purls(project): vers = range_class.from_native(extracted_requirement) except (InvalidVersionRange, InvalidVersion) as exception: if exception is InvalidVersionRange: - description = "Invalid VersionRange" + description = "Version range is invalid or unsupported" else: - description = "Invalid exctracted requirement" + description = "Extracted requirement is not a valid version" details = { "purl": purl, "extracted_requirement": extracted_requirement, diff --git a/scanpipe/tests/pipes/test_purldb.py b/scanpipe/tests/pipes/test_purldb.py index 9aa917666..5a68afa53 100644 --- a/scanpipe/tests/pipes/test_purldb.py +++ b/scanpipe/tests/pipes/test_purldb.py @@ -87,7 +87,9 @@ def test_scanpipe_pipes_purldb_get_unique_unresolved_purls_error(self): self.assertEqual(set(), result) error_message = self.project1.projectmessages.all()[0] - self.assertEqual("Invalid exctracted requirement", error_message.description) + self.assertEqual( + "Extracted requirement is not a valid version", error_message.description + ) @mock.patch("scanpipe.pipes.purldb.request_post") @mock.patch("scanpipe.pipes.purldb.is_available")