From 76175b48a3becdde6fd10b5579b64cf3807e46c9 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Fri, 3 Sep 2021 12:30:26 -0700 Subject: [PATCH] Report casting errors --- protocol/connections/engine.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocol/connections/engine.go b/protocol/connections/engine.go index e34ec7c..0067384 100644 --- a/protocol/connections/engine.go +++ b/protocol/connections/engine.go @@ -8,6 +8,7 @@ import ( model3 "cwtch.im/cwtch/protocol/model" "encoding/base64" "encoding/json" + "fmt" "git.openprivacy.ca/cwtch.im/tapir" "git.openprivacy.ca/cwtch.im/tapir/applications" "git.openprivacy.ca/cwtch.im/tapir/networks/tor" @@ -593,6 +594,7 @@ func (e *engine) sendPeerMessage(handle string, message model3.PeerMessage) erro if ok { return peerApp.SendMessage(message) } + return fmt.Errorf("could not find peer app to send message to: %v", handle) } log.Errorf("could not send peer message: %v", err) return err