Improve error message of dsc/chectl if OpenShift version cannot be determined #23037
Labels
area/chectl
Issues related to chectl, the CLI of Che
kind/enhancement
A feature request - must adhere to the feature request template.
team/A
This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che
Is your enhancement related to a problem? Please describe
I'm trying to get started with Eclipse Che and am using the chectl/dsc as follows:
The error message in itself is not telling much, and it would be nice if it would be more descriptive.
Root cause
The code calls
oc version -o json
and looks for a keyopenshiftVersion
, which doesn't exist.The
openshiftVersion
key does not exist because my user does not have permissions to the necessary endpoint. That's only visible if I increase the log level,oc
returns successfully otherwise and simply does not output the key.Describe the solution you'd like
Output something like "Unable to determine OpenShift version. Check with
oc version -o json --loglevel=8
if you have the necessary permissions."Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: