From 46f6ee2af788e2e0b65b33741036cad084c1198d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Murta?= Date: Thu, 1 Jan 2026 19:03:54 +0000 Subject: [PATCH] feat: log GoCardless responses to file --- pfbudget/extract/nordigen.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pfbudget/extract/nordigen.py b/pfbudget/extract/nordigen.py index ebb9de4..25b68cd 100644 --- a/pfbudget/extract/nordigen.py +++ b/pfbudget/extract/nordigen.py @@ -1,6 +1,7 @@ from dataclasses import dataclass import datetime as dt import dotenv +import json import nordigen import os import requests @@ -65,6 +66,13 @@ class NordigenClient: print(f"Couldn't download transactions for {account.get_metadata()}") continue + with open( + f"logs/{dt.datetime.now().isoformat()}_{requisition_id}.json", + "w", + encoding="utf-8", + ) as f: + json.dump(downloaded, f, ensure_ascii=False, indent=4) + if ( "transactions" not in downloaded or "booked" not in downloaded["transactions"]