Skip to content

Commit

Permalink
feat: 검증 에러 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SHEOMM committed Sep 7, 2024
1 parent f55e1cc commit fdec831
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.method.annotation.HandlerMethodValidationException;

@RestControllerAdvice("com.waruru.areyouhere.session")
@Order(Ordered.SECOND_VALUE)
Expand All @@ -44,6 +45,11 @@ public ResponseEntity<HttpStatus> courseNotFoundFoundHandler() {
return RESPONSE_NOT_FOUND;
}

@ExceptionHandler(HandlerMethodValidationException.class)
public ResponseEntity<HttpStatus> BadRequestHandler(){
return RESPONSE_BAD_REQUEST;
}

@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<HttpStatus> methodArgumentNotValidHandler(){
return RESPONSE_BAD_REQUEST;
Expand Down

0 comments on commit fdec831

Please sign in to comment.