Skip to content

Commit 2d96232

Browse files
committed
[FAB-3694] Fix error handling in peer channel cmd
* Remove unused error checking. * Add error string to the return result. Change-Id: Iabcdf693c9e130aa63a5ce769e6160fda0033c0b Signed-off-by: Baohua Yang <[email protected]>
1 parent f5987e2 commit 2d96232

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

peer/channel/channel.go

-4
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ func InitCmdFactory(isOrdererRequired bool) (*ChannelCmdFactory, error) {
100100
return common.GetBroadcastClient(orderingEndpoint, tls, caFile)
101101
}
102102

103-
if err != nil {
104-
return nil, fmt.Errorf("Error getting broadcast client: %s", err)
105-
}
106-
107103
//for join, we need the endorser as well
108104
if isOrdererRequired {
109105
cmdFact.EndorserClient, err = common.GetEndorserClient()

peer/channel/create.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func sendCreateChainTransaction(cf *ChannelCmdFactory) error {
158158
var broadcastClient common.BroadcastClient
159159
broadcastClient, err = cf.BroadcastFactory()
160160
if err != nil {
161-
return err
161+
return fmt.Errorf("Error getting broadcast client: %s", err)
162162
}
163163

164164
defer broadcastClient.Close()

0 commit comments

Comments
 (0)