You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When an exception is caught and wrapped by AzCLIError, the analysis of the root cause of the exception may not be correct, thus the recommendation can also be misleading.
For example, #15776 assumes InvalidURL is caused by invalid AAD endpoint in cloud registration, but the exception is actually caused by invalid proxy URL. This PR is later reverted by #15962.
In the current design, the original exception is discarded and it is very difficult to identify what the original issue is.
Describe the solution you'd like
AzCLIError should take optional kwarg original_exception=None and when any exception is wrapped/replaced by AzCLIError, original_exception should be set as the original exception so that azure.cli.core.util.handle_exception can log callstack and error message of original_exception to
--debug log
telemetry (if allowed)
The text was updated successfully, but these errors were encountered:
ghost
added
the
needs-triage
This is a new issue that needs to be triaged to the appropriate team.
label
Dec 23, 2020
> pylint --help-msg W0707
:raise-missing-from (W0707): *Consider explicitly re-raising using the 'from' keyword*
Python 3's exception chaining means it shows the traceback of the current
exception, but also the original exception. Not using `raise from` makes the
traceback inaccurate, because the message implies there is a bug in the
exception-handling code itself, which is a separate situation than wrapping
an exception. This message belongs to the exceptions checker.
Is your feature request related to a problem? Please describe.
When an exception is caught and wrapped by
AzCLIError
, the analysis of the root cause of the exception may not be correct, thus the recommendation can also be misleading.For example, #15776 assumes
InvalidURL
is caused by invalid AAD endpoint in cloud registration, but the exception is actually caused by invalid proxy URL. This PR is later reverted by #15962.In the current design, the original exception is discarded and it is very difficult to identify what the original issue is.
Describe the solution you'd like
AzCLIError
should take optional kwargoriginal_exception=None
and when any exception is wrapped/replaced byAzCLIError
,original_exception
should be set as the original exception so thatazure.cli.core.util.handle_exception
can log callstack and error message oforiginal_exception
to--debug
logThe text was updated successfully, but these errors were encountered: