From 933642def6638e06c974da9c5c83a9dae3b92cc7 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 19 Jun 2022 18:26:38 +0100 Subject: [PATCH] Add extra error handling in Nordigen balances --- handler/sinks/nordigen.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler/sinks/nordigen.py b/handler/sinks/nordigen.py index a498f1d..07b57f1 100644 --- a/handler/sinks/nordigen.py +++ b/handler/sinks/nordigen.py @@ -450,6 +450,9 @@ class Nordigen(util.Base): parsed = obj.to_dict() total = 0 currency = None + if "balances" not in parsed: + self.log.error(f"No balances: {parsed}") + return (False, False) for entry in parsed["balances"]: if currency: if not currency == entry["balanceAmount"]["currency"]: