-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise the original error when refreshing token fails #431
Comments
Even if Azure CLI prints MSAL's log, the content of the It is certainly not user-friendly to dump the full traceback in the context of Azure CLI's user experience. https://docs.python.org/3/library/logging.html#logging.Logger.exception
A simple demo: import logging
try:
a = 3 / 0
except:
logging.exception("calculation failed.") Output:
|
Describe the bug
Currently when refreshing token fails, MSAL silences the exception and logs and error:
microsoft-authentication-library-for-python/msal/application.py
Lines 1206 to 1207 in 62752ad
Currently Azure CLI doesn't print MSAL's logs, the real cause will be hidden and all Azure CLI can get is a
None
result. Making it impossible for the end user to know what happened:https://github.com/Azure/azure-cli/blob/925d5f93e9caff6fdc74c03b3755d8811d2baf69/src/azure-cli-core/azure/cli/core/auth/util.py#L119-L121
This topic is very similar to the one we discussed in AzureAD/microsoft-authentication-extensions-for-python#92.
The text was updated successfully, but these errors were encountered: