Skip to content

Commit

Permalink
Update error message to be more verbose
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
vihu committed Mar 28, 2024
1 parent 483c525 commit 241176d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/croc/croc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 241176d

Please sign in to comment.