From 64672213f25fff5f149299bc606f5a60954dfeb8 Mon Sep 17 00:00:00 2001 From: Shane Huston Date: Wed, 8 Jun 2022 12:32:36 +0100 Subject: [PATCH] Correctly handle error when unable to parse amount --- transactions/aibTransaction.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transactions/aibTransaction.go b/transactions/aibTransaction.go index 387deeb..15d8563 100644 --- a/transactions/aibTransaction.go +++ b/transactions/aibTransaction.go @@ -90,7 +90,7 @@ func (t aibTransaction) parseAmount(debitAmount string, creditAmount string) (fl amount, err := strconv.ParseFloat(creditAmount, 32) if err != nil { - return amount, fmt.Errorf("Could not parse amount: %w") + return amount, fmt.Errorf("Could not parse amount: %w", err) } if amount != 0 {