Skip to content

Commit

Permalink
feat: add log info
Browse files Browse the repository at this point in the history
  • Loading branch information
rchen9 committed Nov 15, 2024
1 parent 8b2898c commit c168894
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public String getUser(String code, String redirectUri) {
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
Map tokenResponse = httpWebServiceApiClient.rawPost(tokenUrl, headers);
Map<String, String> tokenBody = Objects.requireNonNull(tokenResponse);
LogUtils.info(LOGGER, "gitlab get user token info", tokenBody);

headers = new HttpHeaders();
String accessToken = tokenBody.get(ACCESS_TOKEN);
Expand All @@ -75,6 +76,7 @@ public String getUser(String code, String redirectUri) {
Map<String, String> userBody = Objects.requireNonNull(userResponse);
return userBody.get(EMAIL);
} catch (Exception e) {
LogUtils.error(LOGGER, "gitlab get user error info", e.getMessage());
LogUtils.error(LOGGER, "gitlab get user error", e);
return null;
}
Expand Down

0 comments on commit c168894

Please sign in to comment.