From d1898339b1d7eb3cb03f61866e93833913120ca5 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Fri, 22 Nov 2019 08:12:48 +0100 Subject: [PATCH] fix: print unexpected messages --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index 06bdd74..09a7ac7 100644 --- a/client.go +++ b/client.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "net/http" + "reflect" ) // CompanyPrivileges contains the privileges for a combination of email address and company id @@ -85,6 +86,8 @@ func (h *PrivilegeHandler) Process(msg interface{}) bool { if ev, ok := msg.(*PrivilegeAdded); ok { h.setPrivileges(ev) return true + } else { + fmt.Printf("Got unexpected message type (%s): '%+v'\n", reflect.TypeOf(msg).String(), msg) } return false }