From 736b31d5b1d7ce740a1f8ab6db0c782a762df7ee Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 14 Sep 2019 13:37:56 +0200 Subject: [PATCH] Log errors in code generation Signed-off-by: Knut Ahlers --- token.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/token.go b/token.go index 7f6bd02..85bae20 100644 --- a/token.go +++ b/token.go @@ -215,7 +215,10 @@ func fetchTokenFromKey(client *api.Client, k string, respChan chan *token, wg *s } } - tok.GenerateCode(pointOfTime) + if err = tok.GenerateCode(pointOfTime); err != nil { + log.WithError(err).WithField("name", tok.Name).Error("Unable to generate code") + return + } if tok.Code == "" { // Nothing ended in us having a code, does not seem to be something for us