mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
gobgp/cmd: add message gRPC connection error
Adds a user-friendly error message on gRPC connection error. Resolves: #1701 Signed-off-by: Paul Greenberg <[email protected]>
This commit is contained in:
+1
-1
@@ -281,7 +281,7 @@ func newClient() *cli.Client {
|
||||
target := net.JoinHostPort(globalOpts.Host, strconv.Itoa(globalOpts.Port))
|
||||
client, err := cli.New(target, grpcOpts...)
|
||||
if err != nil {
|
||||
exitWithError(err)
|
||||
exitWithError(fmt.Errorf("failed to connect to %s over gRPC: %s", target, err))
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user