-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Bug fixes #11716
Bug fixes #11716
Conversation
AlexanderSher
commented
Apr 30, 2020
- Fix [BUG] Azure.Identity DefaultAzureCredential in Visual Studio fails when MFA required #11595: [BUG] Azure.Identity DefaultAzureCredential in Visual Studio fails when MFA required
- Fix [BUG] AzureConfigurationBuilder fails to build connection strings when deployed to App Service #11371: [BUG] AzureConfigurationBuilder fails to build connection strings when deployed to App Service
- Remove some dead code
…ual Studio fails when MFA required - Fix Azure#11371: [BUG] AzureConfigurationBuilder fails to build connection strings when deployed to App Service - Remove some dead code
…nto BugFixes # Conflicts: # sdk/identity/Azure.Identity/src/InteractiveBrowserCredential.cs # sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs
#11371 is fixed in another PR |
@@ -34,27 +36,26 @@ public AccessToken Succeeded(AccessToken token) | |||
return token; | |||
} | |||
|
|||
public AuthenticationFailedException FailAndWrap(Exception ex) | |||
public Exception FailAndWrap(Exception ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your not actually ever returning from this method. Perhaps it should have a void return type and be renamed to FailAndThrow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that if FailAndWrap
method doesn't return exception, compiler requires to return something from catch
statement. So while method doesn't return anything, it is the easiest way for caller to tell that exception is thrown.
@@ -34,27 +36,26 @@ public AccessToken Succeeded(AccessToken token) | |||
return token; | |||
} | |||
|
|||
public AuthenticationFailedException FailAndWrap(Exception ex) | |||
public Exception WrapAndThrow(Exception ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'm being a bit pedantic here but I think the name should be FailAndThrow
rather than WrapAndThrow
. My reasoning behind this is that this is an instance method on CredentialDiagnosticScope
and the high order bit is that we are "failing" the diagnostic scope and then we are throwing the exception (possibly wrapped). If you want to be most precise you could also call it FailWrapAndThrow
but this might be a bit long winded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to FailWrapAndThrow