Skip to content

Commit

Permalink
Remove event details from unmarshalling error
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed May 19, 2022
1 parent 34c7fd3 commit 4875963
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions websocket_managed_conn.go
Expand Up @@ -475,7 +475,7 @@ func (rtm *RTM) handleEvent(typeStr string, event json.RawMessage) {
v, exists := EventMapping[typeStr]
if !exists {
rtm.Debugf("RTM Error - received unmapped event %q: %s\n", typeStr, string(event))
err := fmt.Errorf("RTM Error: Received unmapped event %q: %s", typeStr, string(event))
err := fmt.Errorf("RTM Error: Received unmapped event %q", typeStr)
rtm.IncomingEvents <- RTMEvent{"unmarshalling_error", &UnmarshallingErrorEvent{err}}
return
}
Expand All @@ -484,7 +484,7 @@ func (rtm *RTM) handleEvent(typeStr string, event json.RawMessage) {
err := json.Unmarshal(event, recvEvent)
if err != nil {
rtm.Debugf("RTM Error, could not unmarshall event %q: %s\n", typeStr, string(event))
err := fmt.Errorf("RTM Error: Could not unmarshall event %q: %s", typeStr, string(event))
err := fmt.Errorf("RTM Error: Could not unmarshall event %q", typeStr)
rtm.IncomingEvents <- RTMEvent{"unmarshalling_error", &UnmarshallingErrorEvent{err}}
return
}
Expand Down

0 comments on commit 4875963

Please sign in to comment.