projectatomic / atomic

Atomic Run Tool for installing/running/managing container images.
Other
527 stars 139 forks source link

Unhelpful error message due to wide Exception catching #1144

Open mscherer opened 6 years ago

mscherer commented 6 years ago

Today, I did setup a Fedora 26 atomic VM and while trying to follow openshift ansible documentation, I stumbled on a curious bug:

# atomic install --storage=ostree --name=openshift_ansible --system openshift/origin-ansible 
string indices must be integers

Turn out the traceback is being hidden by https://github.com/projectatomic/atomic/blob/master/atomic#L211

That's not a very good UI since this mean people can't report accurate information or error, and would assume the error is on their side rather than on the code side (because that's what happened to me, I did read the doc twice to figure what was wrong on the argument I gave, rather than a bug that I could correct and/or report), so I would propose to merge the Exception and AssertionError handling to show the traceback, just to be clear this is not a normal error.

mscherer commented 6 years ago

In the mean time, I found --debug to show the traceback, but the point is still valid, we should not show unexpected errors as regular error. Something along the line "unexpected error, please run again with --debug" would at least help to understand the problem is not supposed to be "normal".

rhatdan commented 6 years ago

@baude PTAL