From 7ade66662fa6dcf5b1f7e5ed0a90063e6349bfca Mon Sep 17 00:00:00 2001 From: Campbell Alden Date: Fri, 20 Mar 2026 16:56:51 +0900 Subject: [PATCH] Add logging when transaction recording fails --- reporter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reporter.js b/reporter.js index 470c22e..7dcf298 100644 --- a/reporter.js +++ b/reporter.js @@ -56,8 +56,10 @@ async function init() { await api.addTransactions(config.accountId, [transaction]); console.log(`Successfully logged "${transaction.payee_name} - ¥${transaction.amount}"`); return res.json({ result: 'success' }); - } catch { + } catch (e) { console.log('Transaction failed...'); + console.log(e); + console.log(e.message); return res.json({ result: 'failure' }); } finally { await api.shutdown();