Don't leak stack trace on failure in bulk api
@@ -150,7 +150,7 @@ class PackageViewSet(viewsets.ReadOnlyModelViewSet):
try:
purl = PackageURL.from_string(purl).to_dict()
except ValueError as ve:
- return Response(status=400, data={"Error": str(ve)})
+ return Response(status=400, data={"Error": f"Invalid Package URL: {purl}")
purl_data = Package.objects.filter(
**{key: value for key, value in purl.items() if value}
)
