ovirt-imageio icon indicating copy to clipboard operation
ovirt-imageio copied to clipboard

Don't print tracebacks for expected errors

Open nirs opened this issue 2 years ago • 1 comments

ovirt-img print tracebacks for all errors, however some errors are expected and a traceback is not helpful.

  • Engine login error (bad username or password, user error)
  • Downloading non-existing disk
  • Downloading locked disk (e.g. used by running vm, or another storage operation)
  • Error creating the target image (e.g. permission issue)
  • Uploading non-existing image (user error)
  • Uploading to non-existing storage domain (user error)
  • Uploading when user is not allowed to create disk (engine permissions issue)

In general traceback should be logged only for unexpected error, which may be a bug in the tool or some environment issue. In this case the traceback can help debugging the issue.

nirs avatar Jul 27 '22 18:07 nirs