-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling for
GetCredentialStateForProvider
The `GetCredentialStateForProvider` swallows an error since it was originally written for a codepath where the error was not important. Since then, it is used in a second place where the error is important. I'm not sure if it's possible for the error to get triggered in practice, but I managed to trigger the error path while writing unit tests, which led to a strange and hard to debug error happening after the error was skipped over. Refactor this function to return an error. Ignore it in the call site where it should be ignored, and react to it where it is significant. As a nice side effect of this change, the control flow of `GetCredentialStateForProvider` is significantly simplified. Some unrelated unit test improvements from an ongoing development branch have also been added to this branch.
- Loading branch information
Showing
6 changed files
with
44 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters