Skip to content

Commit

Permalink
Merge pull request #434 from AzureAD/bubble-up-refresh-exception
Browse files Browse the repository at this point in the history
Bubble up refresh exception when we cannot recover
  • Loading branch information
rayluo authored Nov 3, 2021
2 parents d60e31e + 640d88a commit 429f121
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion msal/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,9 @@ def _acquire_token_silent_from_cache_and_possibly_refresh_it(
if (result and "error" not in result) or (not access_token_from_cache):
return result
except: # The exact HTTP exception is transportation-layer dependent
logger.exception("Refresh token failed") # Potential AAD outage?
# Typically network error. Potential AAD outage?
if not access_token_from_cache: # It means there is no fall back option
raise # We choose to bubble up the exception
return access_token_from_cache

def _acquire_token_silent_by_finding_rt_belongs_to_me_or_my_family(
Expand Down

0 comments on commit 429f121

Please sign in to comment.