Skip to content

Commit

Permalink
[BE] REFACTOR: Exception Wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
enaenen committed Aug 18, 2023
1 parent 8c39cfa commit 6ec842c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.ftclub.cabinet.dto.UserBlackholeInfoDto;
import org.ftclub.cabinet.exception.ExceptionStatus;
import org.ftclub.cabinet.exception.ServiceException;
import org.ftclub.cabinet.exception.UtilException;
import org.ftclub.cabinet.lent.service.LentService;
import org.ftclub.cabinet.user.service.UserService;
import org.springframework.http.HttpStatus;
Expand Down Expand Up @@ -192,6 +193,9 @@ public void handleBlackhole(UserBlackholeInfoDto userInfoDto) {
if (e.getStatus().equals(ExceptionStatus.NO_LENT_CABINET)) {
userService.deleteUser(userInfoDto.getUserId(), now);
}
else if (e.getStatus().equals(ExceptionStatus.OAUTH_BAD_GATEWAY))
log.info("handleBlackhole ServiceException {}", e.getStatus());
throw new UtilException(e.getStatus());
} catch (Exception e) {
log.error("handleBlackhole Exception: {}", userInfoDto, e);
}
Expand Down

0 comments on commit 6ec842c

Please sign in to comment.