diff --git a/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts b/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts index 09abf500..ac69b034 100644 --- a/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts +++ b/src/components/Verbrauchsausweis/audits/KlimaFaktoren.ts @@ -11,11 +11,13 @@ export async function auditKlimaFaktoren(ausweis: VerbrauchsausweisWohnenClient, } if (ausweis.startdatum && gebaeude.plz && ausweis.verbrauch_1) { - const response = await getKlimafaktoren(ausweis.startdatum, gebaeude.plz); - if (!response) { - return true; - } + try { + const response = await getKlimafaktoren(ausweis.startdatum, gebaeude.plz); + return true; // Alle Klimfaktoren konnten abgefragt werden. + } catch (e) { + return true; + } } return false; -} \ No newline at end of file +}