diff --git a/internal/peer/chaincode/common.go b/internal/peer/chaincode/common.go index 56c743b5e33..5bb4c188515 100644 --- a/internal/peer/chaincode/common.go +++ b/internal/peer/chaincode/common.go @@ -492,7 +492,7 @@ func InitCmdFactory(cmdName string, isEndorserRequired, isOrdererRequired bool, return nil, errors.WithMessagef(err, "error getting channel (%s) orderer endpoint", channelID) } if len(orderingEndpoints) == 0 { - return nil, errors.Errorf("no orderer endpoints retrieved for channel %s", channelID) + return nil, errors.Errorf("no orderer endpoints retrieved for channel %s, pass orderer endpoint with -o flag instead", channelID) } logger.Infof("Retrieved channel (%s) orderer endpoint: %s", channelID, orderingEndpoints[0]) // override viper env diff --git a/internal/peer/lifecycle/chaincode/client_connections.go b/internal/peer/lifecycle/chaincode/client_connections.go index 1b572f70e3d..c7649929e19 100644 --- a/internal/peer/lifecycle/chaincode/client_connections.go +++ b/internal/peer/lifecycle/chaincode/client_connections.go @@ -184,7 +184,7 @@ func (c *ClientConnections) setOrdererClient() error { return errors.WithMessagef(err, "error getting channel (%s) orderer endpoint", channelID) } if len(orderingEndpoints) == 0 { - return errors.Errorf("no orderer endpoints retrieved for channel %s", channelID) + return errors.Errorf("no orderer endpoints retrieved for channel %s, pass orderer endpoint with -o flag instead", channelID) } logger.Infof("Retrieved channel (%s) orderer endpoint: %s", channelID, orderingEndpoints[0])