-
Notifications
You must be signed in to change notification settings - Fork 432
Add back IsRecoverableException methods. #3183
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
Conversation
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.
Pull Request Overview
This PR reintroduces two overloads for methods that determine whether an exception (or exception type) is recoverable, and adds corresponding tests. Key changes include:
- Adding an overload for IsRecoverableException(Exception exception) that defaults the configuration keys parameter to false.
- Adding an overload for IsRecoverableExceptionType(Type exceptionType) that defaults the configuration keys parameter to false.
- Introducing comprehensive tests to validate the behavior of both methods.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/Microsoft.IdentityModel.Tokens.Tests/TokenUtilitiesTests.cs | Added tests targeting recoverable exception methods. |
| src/Microsoft.IdentityModel.Tokens/TokenUtilities.cs | Added overloads for IsRecoverableException and IsRecoverableExceptionType with updated XML documentation. |
Comments suppressed due to low confidence (1)
src/Microsoft.IdentityModel.Tokens/TokenUtilities.cs:247
- The XML documentation for the IsRecoverableException overload incorrectly refers to an 'exception type' while the parameter is an Exception instance. Updating the summary to accurately reflect the parameter would improve clarity.
/// Check whether the given exception type is recoverable by LKG.
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
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.
Thanks, Peter
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.
LGTM
Thanks @pmaytak
Fixes #3181
Adds back methods and adds tests.