Skip to content

Check error in dynamic flag completion results and log an error in debug mode #966

@craicoverflow

Description

@craicoverflow

These three places we are fetching data from an API to populate the flag completion values:

_ = kafkacmdutil.RegisterNameFlagCompletionFunc(cmd, f)

_ = kafkacmdutil.RegisterNameFlagCompletionFunc(cmd, f)

_ = kafkacmdutil.RegisterNameFlagCompletionFunc(cmd, f)

We are ignoring the error though, which is highly possible. We should log this error in debug mode. It is fine if there is an error as the flag will still work, but it can be a useful addition.

Requires #914 to be completed first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions