fix: print unexpected messages
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user