Skip to content

Commit

Permalink
Handling NullPointerException (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
inh2613 authored Nov 11, 2023
2 parents bf42d02 + 5e59d18 commit cee4db3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public OAuthUserInfoDto getUserInfo(OAuthTokenDto oAuthTokenDto) {
throw new BusinessException("IO Exception이 발생하였습니다.", StatusEnum.INTERNAL_SERVER_ERROR);
} catch (JOSEException e) {
throw new RuntimeException(e);
} catch (Exception e) {
throw new BusinessException("오류가 발생했습니다. 다시 시도해 주세요!", StatusEnum.INTERNAL_SERVER_ERROR);
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public OAuthUserInfoDto getUserInfo(OAuthTokenDto oAuthTokenDto) {
throw new BusinessException("잘못된 Protocol을 통해 요청하였습니다.", StatusEnum.INTERNAL_SERVER_ERROR);
} catch (IOException e) {
throw new BusinessException("IO Exception이 발생하였습니다.", StatusEnum.INTERNAL_SERVER_ERROR);
} catch (Exception e) {
throw new BusinessException("오류가 발생했습니다. 다시 시도해 주세요!", StatusEnum.INTERNAL_SERVER_ERROR);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public OAuthUserInfoDto getUserInfo(OAuthTokenDto oAuthTokenDto) {
throw new BusinessException("잘못된 Protocol을 통해 요청하였습니다.", StatusEnum.INTERNAL_SERVER_ERROR);
} catch (IOException e) {
throw new BusinessException("IO Exception이 발생하였습니다.", StatusEnum.INTERNAL_SERVER_ERROR);
} catch (Exception e) {
throw new BusinessException("오류가 발생했습니다. 다시 시도해 주세요!", StatusEnum.INTERNAL_SERVER_ERROR);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public OAuthUserInfoDto getUserInfo(OAuthTokenDto oAuthTokenDto) {
throw new BusinessException("잘못된 Protocol을 통해 요청하였습니다.", StatusEnum.INTERNAL_SERVER_ERROR);
} catch (IOException e) {
throw new BusinessException("IO Exception이 발생하였습니다.", StatusEnum.INTERNAL_SERVER_ERROR);
} catch (Exception e) {
throw new BusinessException("오류가 발생했습니다. 다시 시도해 주세요!", StatusEnum.INTERNAL_SERVER_ERROR);
}
}

Expand Down

0 comments on commit cee4db3

Please sign in to comment.