Skip to content

Commit

Permalink
Merge pull request #190 from hmcts/sscs-4157-quick-fix
Browse files Browse the repository at this point in the history
Reinstate exception part of log message
  • Loading branch information
chris-moreton authored Jul 11, 2019
2 parents c8d4917 + ad147ea commit f1b4ed2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public String getIdamOauth2Token() {

return cachedToken;
} catch (Exception e) {
log.error("Requesting idam token failed");
log.error("Requesting idam token failed: " + e.getMessage());
throw e;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ public void shouldExceptionGivenErrorWithAppropriateLogMessages() {
//Check the message being logged is correct
assertThat(loggingEvent.get(0).getFormattedMessage(), is("No cached IDAM token found, requesting from IDAM service."));
assertThat(loggingEvent.get(1).getFormattedMessage(), is("Requesting idam token"));
assertThat(loggingEvent.get(2).getFormattedMessage(), containsString("Requesting idam token failed"));
assertThat(loggingEvent.get(2).getFormattedMessage(), containsString("Requesting idam token failed:"));
}
}

0 comments on commit f1b4ed2

Please sign in to comment.