Skip to content

Commit

Permalink
PET-287 refactor : 에러 인터페이스에 http 상태 코드 추가에 따른 GlobalExceptionHandler…
Browse files Browse the repository at this point in the history
…에서 http 상태 코드 조회 반영
  • Loading branch information
tlarbals824 committed Jan 20, 2024
1 parent 04242d8 commit e441a98
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.pawith.commonmodule.exception;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
Expand All @@ -11,6 +10,6 @@ public class GlobalExceptionHandler {
@ExceptionHandler(BusinessException.class)
public ResponseEntity<ErrorResponse> handleJwtException(BusinessException e) {
final ErrorResponse errorResponse = ErrorResponse.from(e);
return new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST);
return new ResponseEntity<>(errorResponse, e.getHttpStatusCode());
}
}

0 comments on commit e441a98

Please sign in to comment.