From 241176d8a4edeba70ef8a2d9c834e980f1cf36c8 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Thu, 28 Mar 2024 17:15:54 -0600 Subject: [PATCH] Update error message to be more verbose Summary ---- This changes the error message (when connecting to an unavailble channel) like so: before: ``` $ croc 6764-jimmy-hilton-inside securing channel...2024/03/28 17:16:25 room not ready ``` after: ``` $ ./croc 6764-jimmy-hilton-inside securing channel...2024/03/28 17:16:12 room (secure channel) not ready, maybe peer disconnected ``` --- src/croc/croc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/croc/croc.go b/src/croc/croc.go index 61262c7..24e414b 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -1052,7 +1052,7 @@ func (c *Client) transfer() (err error) { } if err != nil && strings.Contains(err.Error(), "unexpected end of JSON input") { log.Debugf("error: %s", err.Error()) - err = fmt.Errorf("room not ready") + err = fmt.Errorf("room (secure channel) not ready, maybe peer disconnected") } return }