From 3a8cbdef5575576477160bf5f80b62ff0a54182f Mon Sep 17 00:00:00 2001 From: Tomas Virgl Date: Thu, 27 Jul 2017 16:49:44 +0200 Subject: [PATCH] Update lookup.go --- lookup.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lookup.go b/lookup.go index 4029f5e3a96..9a4285d92c6 100644 --- a/lookup.go +++ b/lookup.go @@ -30,7 +30,10 @@ func toPeerInfos(ps []peer.ID) []*pstore.PeerInfo { } func loggableKey(k string) logging.LoggableMap { - if cid, err := cid.Cast([]byte(k)); err == nil { + cid, err := cid.Cast([]byte(k)) + if err != nil { + log.Errorf("loggableKey could not cast key: %v", err) + } else { k = cid.String() } return logging.LoggableMap{