Skip to content

Commit

Permalink
!hotfix: 핸들러에서 에러 메세지 출력하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimday0326 committed Jan 30, 2024
1 parent 738481d commit a227462
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.sponus.sponusbe.auth.jwt.exception.SecurityCustomException;
import com.sponus.sponusbe.auth.jwt.exception.SecurityErrorCode;
import com.sponus.sponusbe.auth.jwt.util.HttpResponseUtil;
import com.sponus.sponusbe.global.common.ApiResponse;
import com.sponus.sponusbe.global.common.BaseErrorCode;

import jakarta.servlet.FilterChain;
Expand Down Expand Up @@ -37,10 +38,15 @@ protected void doFilterInternal(
);
} catch (Exception e) {
log.error(">>>>> Exception : ", e);
ApiResponse<String> errorResponse = ApiResponse.onFailure(
SecurityErrorCode.INTERNAL_SECURITY_ERROR.getCode(),
SecurityErrorCode.INTERNAL_SECURITY_ERROR.getMessage(),
e.getMessage()
);
HttpResponseUtil.setErrorResponse(
response,
HttpStatus.INTERNAL_SERVER_ERROR,
SecurityErrorCode.INTERNAL_SECURITY_ERROR.getErrorResponse()
errorResponse
);
}
}
Expand Down

0 comments on commit a227462

Please sign in to comment.