Skip to content

Commit 9038e18

Browse files
Santiago GonzalezSomkaPe
authored andcommitted
Include MsalServiceException in log error
1 parent ddda2e3 commit 9038e18

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/com/microsoft/aad/msal4j/AuthenticationResultSupplier.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,19 @@ private void logResult(AuthenticationResult result, HttpHeaders headers) {
130130

131131
private void logException(Exception ex) {
132132

133-
String logMessage = LogHelper.createMessage("Execution of " + this.getClass()
134-
+ " failed.", msalRequest.headers().getHeaderCorrelationIdValue());
133+
String logMessage = LogHelper.createMessage(
134+
"Execution of " + this.getClass() + " failed.",
135+
msalRequest.headers().getHeaderCorrelationIdValue());
135136

136137
if (ex instanceof MsalClientException) {
137138
MsalClientException exception = (MsalClientException) ex;
138139
if (exception.errorCode().equalsIgnoreCase(AuthenticationErrorCode.CACHE_MISS)) {
139140
clientApplication.log.debug(logMessage, ex);
140141
return;
141142
}
142-
143-
clientApplication.log.error(logMessage, ex);
144143
}
144+
145+
clientApplication.log.error(logMessage, ex);
145146
}
146147

147148
private ApiEvent initializeApiEvent(MsalRequest msalRequest){

0 commit comments

Comments
 (0)