diff --git a/harness/report.py b/harness/report.py index f138154cd..018a25469 100644 --- a/harness/report.py +++ b/harness/report.py @@ -196,6 +196,8 @@ def build_property_report( name: str = path.stem try: epc = EpcPropertyDataMapper.from_api_response(json.loads(path.read_text())) + if epc is None: + raise ValueError("Unsupported or unrecognised EPC schema") lodged_sap: Optional[int] = epc.energy_rating_current calculated_sap: float = Sap10Calculator().calculate(epc).sap_score_continuous except Exception as error: # noqa: BLE001 — one bad cert must not abort the report