Skip to content

Commit

Permalink
apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rkpattnaik780 committed Apr 9, 2021
1 parent 12cce2e commit f4c503e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/rhoas/pkged.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/commands/rhoas_kafka_consumergroup_describe.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rhoas kafka consumergroup describe [flags]

....
# describe a consumer group
$ rhoas kafka consumergroup describe --id consumer_group_1 -o json
$ rhoas kafka consumergroup describe consumer_group_1 -o json
....

Expand Down
2 changes: 1 addition & 1 deletion locales/cmd/kafka/consumergroup/common/active.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ other = 'you are forbidden to {{.Operation}} these consumer groups'
one = 'internal server error'

[kafka.consumerGroup.common.error.notFoundError]
one = 'topic "{{.TopicName}}" not found in Kafka instance "{{.InstanceName}}"'
one = 'consumer group "{{.ConsumerGroupID}}" not found in Kafka instance "{{.InstanceName}}"'

[kafka.consumerGroup.common.error.unableToConnectToKafka]
one = 'unable to connect to Kafka instance "{{.Name}}"'
Expand Down
2 changes: 1 addition & 1 deletion locales/cmd/kafka/consumergroup/describe/active.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Print detailed information for a consumer group and its members.
[kafka.consumerGroup.describe.cmd.example]
one = '''
# describe a consumer group
$ rhoas kafka consumergroup describe --id consumer_group_1 -o json
$ rhoas kafka consumergroup describe consumer_group_1 -o json
'''

[kafka.consumerGroup.describe.output.id]
Expand Down
2 changes: 1 addition & 1 deletion locales/cmd/login/active.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ one = 'You are now logged in to MAS-SSO as <span style="font-weight:700">{{.User

[login.error.schemeMissingFromUrl]
description = 'Error message for when scheme is missing from the Auth URL'
one = 'scheme missing from URL "{{.URL}}". Please add either "https" or "https"'
one = 'scheme missing from URL "{{.URL}}". Please add either "http" or "https"'

[login.log.debug.createdAuthorizationUrl]
description = 'Debug message to show the authorization URL'
Expand Down
8 changes: 8 additions & 0 deletions pkg/cmd/kafka/consumergroup/describe/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ func runCmd(opts *Options) error {
"Operation": "view",
},
}))
case 404:
return errors.New(localizer.MustLocalize(&localizer.Config{
MessageID: "kafka.consumerGroup.common.error.notFoundError",
TemplateData: map[string]interface{}{
"ConsumerGroupID": opts.id,
"InstanceName": kafkaInstance.GetName(),
},
}))
case 500:
return fmt.Errorf("%v: %w", localizer.MustLocalizeFromID("kafka.consumerGroup.common.error.internalServerError"), consumerGroupErr)
case 503:
Expand Down

0 comments on commit f4c503e

Please sign in to comment.