Skip to content

Commit

Permalink
Merge pull request #184 from 42organization/GGBE-212-access-token
Browse files Browse the repository at this point in the history
[fix] GGBE-212 예상치못한 에러시 front url로 redir, 백엔드 에러페이지 안뜨도록
  • Loading branch information
wken5577 authored Aug 2, 2023
2 parents 6450d2a + 23e640a commit 370719b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ public class OAuthAuthenticationSuccessHandler extends SimpleUrlAuthenticationSu
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException {
String targetUrl = determineTargetUrl(request, response, authentication);
String targetUrl;
try{
targetUrl = determineTargetUrl(request, response, authentication);
} catch (Exception e) {
targetUrl = applicationYmlRead.getFrontUrl();
}

if (response.isCommitted()) {
logger.debug("Response has already been committed. Unable to redirect to " + targetUrl);
Expand Down

0 comments on commit 370719b

Please sign in to comment.