Make troubleshooting/debugging custom accessTokenCallbackClass possible - #2990
Merged
Conversation
…, the relevant exception may be missed because of a call to getCause(). If the exception doesn't have a cause exception, it will leave no chained exception to the SQLServerException(), effectively eliminating effective troubleshooting information. If it does have a cause exception, it should still be listed as the logging prints out the stack trace will all the caused by traces. (cherry picked from commit b01455f)
machavan
reviewed
Jul 20, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2990 +/- ##
============================================
+ Coverage 59.25% 60.18% +0.93%
- Complexity 5046 5140 +94
============================================
Files 153 153
Lines 36350 36636 +286
Branches 6650 6721 +71
============================================
+ Hits 21538 22051 +513
+ Misses 11053 10753 -300
- Partials 3759 3832 +73 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
machavan
approved these changes
Jul 27, 2026
Ananya2
approved these changes
Jul 27, 2026
muskan124947
approved these changes
Jul 27, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This change improves error visibility for custom accessTokenCallbackClass failures by preserving the original exception instead of only its cause.
What changed:
In [SQLServerConnection.java, the thrown SQLServerException now uses e instead of e.getCause().
If callback exception has no cause, the real exception is no longer lost.
If callback exception has a cause, full chained details are still available through the original exception.
Scope:
One file changed.
No functional auth flow change, only better troubleshooting/debugging context.