Skip to content
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

fix: SKFP-1025 add logs on error when refreshing fence token #294

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/java/io/kidsfirst/core/service/FenceService.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ public Mono<OIDCTokens> refreshTokens(String refreshToken, AllFences.Fence fence
.getOIDCTokens();

return Optional.of(tokens);
} else {
log.error("Error in token refresh {} - {} - {}", fence.getName(), fenceResponse.getStatusCode(), fenceResponse.getBody());
return Optional.empty();
}

return Optional.empty();
});

return blockingWrapper.subscribeOn(Schedulers.boundedElastic()).flatMap(o -> o.map(Mono::just).orElseGet(Mono::empty));
Expand Down Expand Up @@ -91,7 +93,7 @@ public Mono<OIDCTokens> requestTokens(String authCode, AllFences.Fence fence) {

return Optional.of(tokens);
} else {
log.error("Error in {} fence response during request tokens: status={}, content={}", fence.getName(), fenceResponse.getStatusCode(), fenceResponse.getContent());
log.error("Error in token request {} - {} - {}", fence.getName(), fenceResponse.getStatusCode(), fenceResponse.getBody());
return Optional.empty();
}});

Expand Down
Loading