File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/com/somemore/global/exception/handler Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ ProblemDetail handleDuplicateException(final DuplicateException e) {
4949 @ ExceptionHandler (MethodArgumentNotValidException .class )
5050 ProblemDetail handleMethodArgumentNotValid (final MethodArgumentNotValidException e ) {
5151
52- ProblemDetail problemDetail = ProblemDetail .forStatusAndDetail (HttpStatus .BAD_REQUEST , e .getMessage ());
52+ String errorMessage = e .getBindingResult ().getAllErrors ().getFirst ().getDefaultMessage ();
53+ ProblemDetail problemDetail = ProblemDetail .forStatusAndDetail (HttpStatus .BAD_REQUEST , errorMessage );
5354
5455 problemDetail .setTitle ("유효성 예외" );
55- problemDetail .setDetail ("입력 데이터 유효성 검사가 실패했습니다. 각 필드를 확인해주세요." );
5656
5757 return problemDetail ;
5858 }
You can’t perform that action at this time.
0 commit comments