From 6436707a5d493281308ab5db57b606efdba56853 Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Mon, 13 Nov 2023 12:14:19 -0700 Subject: [PATCH] better error and update comments --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 52b53d7..6e4ea7c 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( ) var ( - configuredProviders []AccountProvider // Any providers that are successfully configured get added to this slice + configuredProviders []AccountProvider // Any account providers that are successfully configured get added to this slice ynabClient *ynab.Client // YNAB HTTP client ) @@ -29,7 +29,8 @@ func init() { } } - // Loop through all providers and attempt to configure them + // Loop through all account providers and attempt to configure them + // if configuration fails, the provider will not be used configuredProviders = make([]AccountProvider, 0) for _, p := range allProviders { err := p.Configure() @@ -60,7 +61,7 @@ func main() { continue } if len(balances) != len(accountIDs) { - log.Printf("mismatched balance and accountID slice lengths - expected the same: balances length = %d, accountIDs length = %d", len(balances), len(accountIDs)) + log.Printf("'%s' provider data validation error: mismatched balance and accountID slice lengths - expected the same: balances length = %d, accountIDs length = %d", p.Name(), len(balances), len(accountIDs)) continue } for i := range balances {