Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve peer CLI error message when no orderer address passed #1555

Merged
merged 1 commit into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/peer/chaincode/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/peer/lifecycle/chaincode/client_connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down