feat(exceptions): add custom error for provider connection during scans (#8234)

This commit is contained in:
Víctor Fernández Poyatos authored and GitHub committed 2025-07-10 14:13:19 +05:45
1 parent da9d7199b7
commit 430f831543
5 files changed
+18 -6

No files matched your search

+2 -1
View File
@@ -12,6 +12,7 @@ from tasks.jobs.scan import (
)
from tasks.utils import CustomEncoder
from api.exceptions import ProviderConnectionError
from api.models import (
ComplianceRequirementOverview,
Finding,
@@ -204,7 +205,7 @@ class TestPerformScan:
provider_id = str(provider.id)
checks_to_execute = ["check1", "check2"]
with pytest.raises(ValueError):
with pytest.raises(ProviderConnectionError):
perform_prowler_scan(tenant_id, scan_id, provider_id, checks_to_execute)
scan.refresh_from_db()