Add exception handling for sending to a peer.