Skip to content

Commit

Permalink
Correctly handle error when unable to parse amount
Browse files Browse the repository at this point in the history
  • Loading branch information
stonish authored and --global committed Jun 8, 2022
1 parent 4efb845 commit 6467221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transactions/aibTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6467221

Please sign in to comment.