python icon indicating copy to clipboard operation
python copied to clipboard

ConfigExceptions aren't made visible

Open merval opened this issue 10 months ago • 5 comments

What is the feature and why do you need it: When loading the kube config, if any ConfigException is thrown it's caught and simply printed as an error message. This prevents any action being taken by the user when the exception is thrown. It also doesn't halt the application, which causes cascading errors.

Describe the solution you'd like to see: Very simple fix: https://github.com/kubernetes-client/python/blob/e0234d3e7193aea4b4e8f487cab0f1228f4386d2/kubernetes/base/config/kube_config.py#L519-L520

Should be:

except ConfigException as e:
    raise ConfigException(e)
except Exception as e:
    logging.error(str(e))

merval avatar Apr 12 '24 16:04 merval